[tbb-commits] [Git][tpo/applications/fenix][tor-browser-89.1.1-10.5-1] 2 commits: squash! Modify UI/UX
Matthew Finkel (@sysrqb)
gitlab at torproject.org
Tue Jun 15 15:14:51 UTC 2021
Matthew Finkel pushed to branch tor-browser-89.1.1-10.5-1 at The Tor Project / Applications / fenix
Commits:
416bcf65 by Matthew Finkel at 2021-06-15T14:34:24+00:00
squash! Modify UI/UX
Bug 40166: Hide "Normal" tab (again) and Sync tab in TabTray
- - - - -
dca9b30b by Matthew Finkel at 2021-06-15T14:34:27+00:00
squash! Modify UI/UX
Bug 40167: Hide "Save to Collection" in menu
- - - - -
3 changed files:
- app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt
- app/src/main/java/org/mozilla/fenix/tabstray/TabLayoutMediator.kt
- app/src/main/res/layout/component_tabstray2.xml
Changes:
=====================================
app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt
=====================================
@@ -472,13 +472,13 @@ open class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.AddToTopSites)
}
- val saveToCollectionItem = BrowserMenuImageText(
- label = context.getString(R.string.browser_menu_save_to_collection_2),
- imageResource = R.drawable.ic_tab_collection,
- iconTintColorResource = primaryTextColor()
- ) {
- onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
- }
+ //val saveToCollectionItem = BrowserMenuImageText(
+ // label = context.getString(R.string.browser_menu_save_to_collection_2),
+ // imageResource = R.drawable.ic_tab_collection,
+ // iconTintColorResource = primaryTextColor()
+ //) {
+ // onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
+ //}
val settingsItem = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_settings),
@@ -575,7 +575,7 @@ open class DefaultToolbarMenu(
//addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
//installToHomescreen.apply { visible = ::canInstall },
addToTopSitesItem,
- saveToCollectionItem,
+ //saveToCollectionItem,
BrowserMenuDivider(),
settingsItem,
if (shouldDeleteDataOnQuit) deleteDataOnQuit else null,
=====================================
app/src/main/java/org/mozilla/fenix/tabstray/TabLayoutMediator.kt
=====================================
@@ -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() {
=====================================
app/src/main/res/layout/component_tabstray2.xml
=====================================
@@ -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
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/f48f4d47eff999da8c4a3f5579b58bc3123d60ab...dca9b30b22e7f69a8acb86c022fdfe4cb4374c04
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/f48f4d47eff999da8c4a3f5579b58bc3123d60ab...dca9b30b22e7f69a8acb86c022fdfe4cb4374c04
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20210615/97a6c54d/attachment-0001.htm>
More information about the tbb-commits
mailing list