Skip to content
Snippets Groups Projects
Unverified Commit 416bcf65 authored by Matthew Finkel's avatar Matthew Finkel
Browse files

squash! Modify UI/UX

Bug 40166: Hide "Normal" tab (again) and Sync tab in TabTray
parent f48f4d47
Branches
Tags
1 merge request!122Re-hide UI elements
......@@ -4,7 +4,9 @@
package org.mozilla.fenix.tabstray
import android.view.View
import androidx.annotation.VisibleForTesting
import androidx.core.view.isGone
import com.google.android.material.tabs.TabLayout
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.support.base.feature.LifecycleAwareFeature
......@@ -36,6 +38,15 @@ class TabLayoutMediator(
tabLayout.addOnTabSelectedListener(observer)
selectActivePage()
// Find normal mode tabs and set visibility
tabLayout.getTabAt(POSITION_NORMAL_TABS)?.getCustomView()?.apply {
// The View we get from getCustomView() is only a sub-component
// of the actual tab (for example, the tab-count box). We need
// the "Custom View"'s parent for controlling the visibility
// of the entire tab.
(getParent() as? View)?.isGone = true
}
}
override fun stop() {
......
......@@ -101,14 +101,6 @@
android:contentDescription="@string/tabs_header_private_tabs_title"
android:icon="@drawable/ic_private_browsing" />
<com.google.android.material.tabs.TabItem
android:id="@+id/synced_tab_item"
android:layout_width="0dp"
android:layout_height="match_parent"
android:contentDescription="@string/tabs_header_synced_tabs_title"
android:foregroundTint="@color/photonWhite"
android:icon="@drawable/ic_synced_tabs" />
</com.google.android.material.tabs.TabLayout>
<ImageButton
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment