diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/browser/InactiveTabViewHolder.kt b/app/src/main/java/org/mozilla/fenix/tabstray/browser/InactiveTabViewHolder.kt index 68fee1b8e5..93e22b3685 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/browser/InactiveTabViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/browser/InactiveTabViewHolder.kt @@ -6,6 +6,7 @@ package org.mozilla.fenix.tabstray.browser import android.view.View import androidx.annotation.StringRes +import androidx.core.view.updatePadding import androidx.recyclerview.widget.RecyclerView import mozilla.components.browser.toolbar.MAX_URI_LENGTH import mozilla.components.concept.tabstray.Tab @@ -17,6 +18,7 @@ import org.mozilla.fenix.databinding.InactiveTabListItemBinding import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.loadIntoView import org.mozilla.fenix.ext.toShortUrl +import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.dpToPx import org.mozilla.fenix.tabstray.browser.AutoCloseInterval.Manual import org.mozilla.fenix.tabstray.browser.AutoCloseInterval.OneDay import org.mozilla.fenix.tabstray.browser.AutoCloseInterval.OneMonth @@ -42,6 +44,11 @@ sealed class InactiveTabViewHolder(itemView: View) : RecyclerView.ViewHolder(ite it.isActivated = newState binding.chevron.rotation = ROTATION_DEGREE + + // When the header is collapsed we use its bottom border instead of the footer's + binding.inactiveHeaderBorder.updatePadding( + bottom = binding.root.context.dpToPx(if (it.isActivated) 0f else 1f) + ) } } } diff --git a/app/src/main/res/layout/inactive_footer_item.xml b/app/src/main/res/layout/inactive_footer_item.xml index 68c1d774e4..955ff5b42a 100644 --- a/app/src/main/res/layout/inactive_footer_item.xml +++ b/app/src/main/res/layout/inactive_footer_item.xml @@ -2,40 +2,50 @@ - 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/. --> - + android:backgroundTint="@color/photonLightGrey30" + android:importantForAccessibility="no" + android:paddingStart="1dp" + android:paddingEnd="1dp" + android:paddingBottom="1dp"> - - - + android:background="@drawable/rounded_bottom_corners" + android:paddingBottom="8dp"> + + + + - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/inactive_header_item.xml b/app/src/main/res/layout/inactive_header_item.xml index 2af0c5d37a..a0a84b1a6e 100644 --- a/app/src/main/res/layout/inactive_header_item.xml +++ b/app/src/main/res/layout/inactive_header_item.xml @@ -1,46 +1,58 @@ - + android:backgroundTint="@color/photonLightGrey30" + android:importantForAccessibility="no" + android:paddingStart="1dp" + android:paddingTop="1dp" + android:paddingEnd="1dp"> + + - + - + - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/inactive_recently_closed_item.xml b/app/src/main/res/layout/inactive_recently_closed_item.xml index 0c008f1093..7f019216e3 100644 --- a/app/src/main/res/layout/inactive_recently_closed_item.xml +++ b/app/src/main/res/layout/inactive_recently_closed_item.xml @@ -1,45 +1,54 @@ - + android:background="@color/photonLightGrey30" + android:importantForAccessibility="no" + android:paddingStart="1dp" + android:paddingEnd="1dp"> - - + android:background="?above" + android:foreground="?android:attr/selectableItemBackground" + android:minHeight="@dimen/mozac_widget_site_item_height"> - - + + + + + + + diff --git a/app/src/main/res/layout/inactive_tab_list_item.xml b/app/src/main/res/layout/inactive_tab_list_item.xml index 8a576c788a..3a83e2d677 100644 --- a/app/src/main/res/layout/inactive_tab_list_item.xml +++ b/app/src/main/res/layout/inactive_tab_list_item.xml @@ -1,14 +1,22 @@ - - - + android:background="@color/photonLightGrey30" + android:importantForAccessibility="no" + android:paddingStart="1dp" + android:paddingEnd="1dp"> + + + \ No newline at end of file