From e7ccecbf0c8bfd48e49e87a3cced37995c6f47dd Mon Sep 17 00:00:00 2001 From: Jeff Boek Date: Fri, 29 May 2020 18:47:17 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/10848 - Fixes menu background color --- .../fenix/settings/about/viewholders/AboutItemViewHolder.kt | 2 +- .../app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/viewholders/AboutItemViewHolder.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/viewholders/AboutItemViewHolder.kt index 64c6ff87f89e..90cdbcfa774e 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/viewholders/AboutItemViewHolder.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/viewholders/AboutItemViewHolder.kt @@ -1,4 +1,4 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public + /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt index 77187234cabd..59b1f4e01f88 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt @@ -5,9 +5,12 @@ package org.mozilla.fenix.tabtray import android.content.Context +import android.graphics.drawable.ColorDrawable import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.cardview.widget.CardView +import androidx.core.content.ContextCompat import androidx.core.view.isVisible import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.tabs.TabLayout @@ -143,6 +146,12 @@ class TabTrayView( tabTrayItemMenu.menuBuilder .build(view.context) .show(anchor = it) + .also { pu -> + (pu.contentView as? CardView)?.setCardBackgroundColor(ContextCompat.getColor( + view.context, + R.color.foundation_normal_theme + )) + } } fabView.new_tab_button.setOnClickListener { -- 2.11.4.GIT