commit e7de60c5463a77a6ad7df95b294835e6692b8ade
parent 3a61285f7cc30fc2d5a5ece1b4fcd33d356e1442
Author: iorgamgabriel <iorgamgabriel@yahoo.com>
Date: Thu, 30 Oct 2025 11:00:39 +0000
Bug 1995981 - [Tab Management Phase 1] Tabs should be visible or partially visible when in list view, in landscape mode. r=android-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D270304
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/ui/tabpage/TabLayout.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/ui/tabpage/TabLayout.kt
@@ -92,6 +92,10 @@ private val TabListCornerShape = RoundedCornerShape(
bottomStart = TabListItemCornerRadius,
bottomEnd = TabListItemCornerRadius,
)
+private val TabListLastItemShape = RoundedCornerShape(
+ bottomStart = TabListItemCornerRadius,
+ bottomEnd = TabListItemCornerRadius,
+)
/**
* Top-level UI for displaying a list of tabs.
@@ -332,7 +336,6 @@ private fun TabList(
start = TabListPadding,
end = TabListPadding,
top = TabListPadding,
- bottom = tabListBottomPadding,
)
.clip(TabListCornerShape)
.background(MaterialTheme.colorScheme.surface)
@@ -342,6 +345,9 @@ private fun TabList(
shouldLongPressToDrag = shouldLongPress,
),
state = state,
+ contentPadding = PaddingValues(
+ bottom = tabListBottomPadding,
+ ),
) {
header?.let {
item(key = HEADER_ITEM_KEY) {
@@ -360,6 +366,11 @@ private fun TabList(
) {
TabListItem(
tab = tab,
+ modifier = if (index == tabs.size - 1) {
+ Modifier.clip(TabListLastItemShape)
+ } else {
+ Modifier
+ },
isSelected = tab.id == selectedTabId,
multiSelectionEnabled = isInMultiSelectMode,
multiSelectionSelected = selectionMode.selectedTabs.any { it.id == tab.id },