From f8d0a972104da9b41aef3a7b6d42599cf53026cc Mon Sep 17 00:00:00 2001 From: ekager Date: Wed, 21 Oct 2020 12:47:25 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/16084 - Match elevation of Tab in Collection to header (https://github.com/mozilla-mobile/fenix/pull/16100) --- .../sessioncontrol/viewholders/TabInCollectionViewHolder.kt | 3 +++ app/src/main/res/layout/collection_home_list_row.xml | 2 +- app/src/main/res/values/dimens.xml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TabInCollectionViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TabInCollectionViewHolder.kt index 75d5ae7cae..319e87b572 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TabInCollectionViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TabInCollectionViewHolder.kt @@ -43,6 +43,9 @@ class TabInCollectionViewHolder( ) } + // This needs to match the elevation of the CollectionViewHolder for the shadow + view.elevation = view.resources.getDimension(R.dimen.home_collection_elevation) + view.setOnClickListener { interactor.onCollectionOpenTabClicked(tab) } diff --git a/app/src/main/res/layout/collection_home_list_row.xml b/app/src/main/res/layout/collection_home_list_row.xml index 8affcd8bc2..a0a13aa151 100644 --- a/app/src/main/res/layout/collection_home_list_row.xml +++ b/app/src/main/res/layout/collection_home_list_row.xml @@ -11,7 +11,7 @@ android:background="@drawable/collection_home_list_row_background" android:clickable="true" android:clipToPadding="false" - android:elevation="5dp" + android:elevation="@dimen/home_collection_elevation" android:focusable="true" android:foreground="?android:attr/selectableItemBackground"> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 4c536c1852..7212bcd197 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -91,6 +91,7 @@ 60dp + 5dp