From 756578c0d2ac13de05896d38152007f971de89ad Mon Sep 17 00:00:00 2001 From: Sawyer Blatz Date: Tue, 12 Nov 2019 10:01:32 -0800 Subject: [PATCH] For #5694: Adds changing toolbar position functionality --- app/metrics.yaml | 2 +- .../fenix/browser/BaseBrowserFragment.kt | 8 ++-- .../mozilla/fenix/browser/BrowserFragment.kt | 14 ++++++ .../browser/BrowserToolbarTopBehavior.kt | 5 +- .../components/metrics/GleanMetricsService.kt | 1 + .../components/toolbar/BrowserToolbarView.kt | 28 +++++++---- .../components/toolbar/DefaultToolbarMenu.kt | 9 ++-- .../toolbar/EngineViewTopBehavior.kt | 46 +++++++++++++++++++ .../customtabs/ExternalAppBrowserFragment.kt | 10 ++-- .../fenix/search/toolbar/ToolbarView.kt | 19 ++++++-- .../fenix/settings/SettingsFragment.kt | 19 ++++---- .../fenix/settings/ToolbarSettingsFragment.kt | 2 +- .../java/org/mozilla/fenix/utils/Settings.kt | 7 +++ ...l => component_bottom_browser_toolbar.xml} | 5 +- .../component_browser_bottom_toolbar.xml | 25 ++++++++++ .../component_browser_top_toolbar_fixed.xml | 25 ++++++++++ app/src/main/res/layout/fragment_browser.xml | 3 +- docs/metrics.md | 2 +- 18 files changed, 189 insertions(+), 41 deletions(-) create mode 100644 app/src/main/java/org/mozilla/fenix/components/toolbar/EngineViewTopBehavior.kt rename app/src/main/res/layout/{component_search.xml => component_bottom_browser_toolbar.xml} (86%) create mode 100644 app/src/main/res/layout/component_browser_bottom_toolbar.xml create mode 100644 app/src/main/res/layout/component_browser_top_toolbar_fixed.xml diff --git a/app/metrics.yaml b/app/metrics.yaml index b57dcdee2bfd..7ecb3f566d08 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -187,7 +187,7 @@ toolbar_settings: bugs: - https://github.com/mozilla-mobile/fenix/issue/6054 data_reviews: - - https://github.com/mozilla-mobile/fenix/pull/TODO + - https://github.com/mozilla-mobile/fenix/pull/6571 notification_emails: - fenix-core@mozilla.com expires: "2020-03-01" diff --git a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt index 639b6658a239..fb0f2ffcbf64 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -23,7 +23,6 @@ import androidx.lifecycle.lifecycleScope import androidx.navigation.NavDirections import androidx.navigation.fragment.findNavController import com.google.android.material.snackbar.Snackbar -import kotlinx.android.synthetic.main.component_search.toolbar import kotlinx.android.synthetic.main.fragment_browser.* import kotlinx.android.synthetic.main.fragment_browser.view.* import kotlinx.coroutines.Dispatchers.IO @@ -197,6 +196,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs browserToolbarView = BrowserToolbarView( container = view.browserLayout, + shouldUseBottomToolbar = context.settings().shouldUseBottomToolbar, interactor = browserInteractor, customTabSession = customTabSessionId?.let { sessionManager.findSessionById(it) } ) @@ -213,7 +213,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs sessionId = customTabSessionId, stub = view.stubFindInPage, engineView = view.engineView, - toolbar = toolbar + toolbar = browserToolbarView.view ), owner = this, view = view @@ -350,14 +350,14 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE activity?.enterToImmersiveMode() - toolbar.visibility = View.GONE + browserToolbarView.view.visibility = View.GONE } else { activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER activity?.exitImmersiveModeIfNeeded() (activity as? HomeActivity)?.let { activity -> activity.themeManager.applyStatusBarTheme(activity) } - toolbar.visibility = View.VISIBLE + browserToolbarView.view.visibility = View.VISIBLE } updateLayoutMargins(inFullScreen) }, diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index d888b85ac32b..f3a890333d2d 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -18,10 +18,12 @@ import android.widget.ImageView import android.widget.PopupWindow import android.widget.RadioButton import androidx.appcompat.widget.AppCompatImageView +import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.content.ContextCompat import androidx.lifecycle.Observer import androidx.transition.TransitionInflater import com.google.android.material.snackbar.Snackbar +import kotlinx.android.synthetic.main.fragment_browser.* import kotlinx.android.synthetic.main.fragment_browser.view.* import kotlinx.android.synthetic.main.fragment_home.* import kotlinx.android.synthetic.main.tracking_protection_onboarding_popup.view.* @@ -128,6 +130,18 @@ class BrowserFragment : BaseBrowserFragment(), BackHandler { super.onStart() subscribeToTabCollections() getSessionById()?.register(toolbarSessionObserver, this, autoPause = true) + + updateToolbar() + } + + private fun updateToolbar() { + val browserEngine = swipeRefresh.layoutParams as CoordinatorLayout.LayoutParams + + browserEngine.bottomMargin = if (requireContext().settings().shouldUseBottomToolbar) { + requireContext().dimen(R.dimen.browser_toolbar_height) + } else { + 0 + } } private val toolbarSessionObserver = object : Session.Observer { diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserToolbarTopBehavior.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserToolbarTopBehavior.kt index 58e6a82a9df3..3620bc887d43 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserToolbarTopBehavior.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserToolbarTopBehavior.kt @@ -7,6 +7,7 @@ package org.mozilla.fenix.browser import android.animation.ValueAnimator import android.content.Context import android.util.AttributeSet +import android.util.Log import android.view.Gravity import android.view.View import android.view.View.SCROLL_AXIS_VERTICAL @@ -96,6 +97,8 @@ class BrowserToolbarTopBehavior( override fun layoutDependsOn(parent: CoordinatorLayout, child: BrowserToolbar, dependency: View): Boolean { if (dependency is Snackbar.SnackbarLayout) { positionSnackbar(dependency) + } else { + Log.d("Sawyer", "depenedency: $dependency") } return super.layoutDependsOn(parent, child, dependency) @@ -111,7 +114,7 @@ class BrowserToolbarTopBehavior( val params = view.layoutParams as CoordinatorLayout.LayoutParams // Position the snackbar below the toolbar so that it doesn't overlay the toolbar. - params.anchorId = R.id.quick_action_sheet + params.anchorId = R.id.toolbar params.anchorGravity = Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL params.gravity = Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index c804ad1c4547..90f663efbb61 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -445,6 +445,7 @@ private val Event.wrapper: EventWrapper<*>? ) is Event.ViewLoginPassword -> EventWrapper( { Logins.viewPasswordLogin.record(it) } + ) is Event.ToolbarPositionChanged -> EventWrapper( { ToolbarSettings.changedPosition.record(it) }, { ToolbarSettings.changedPositionKeys.valueOf(it) } diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarView.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarView.kt index 37ff701e3bc1..4accb7cfdf8d 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarView.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarView.kt @@ -15,9 +15,7 @@ import androidx.core.content.ContextCompat import androidx.core.view.isVisible import com.google.android.material.snackbar.Snackbar import kotlinx.android.extensions.LayoutContainer -import kotlinx.android.synthetic.main.browser_toolbar_popup_window.view.copy -import kotlinx.android.synthetic.main.browser_toolbar_popup_window.view.paste -import kotlinx.android.synthetic.main.browser_toolbar_popup_window.view.paste_and_go +import kotlinx.android.synthetic.main.browser_toolbar_popup_window.view.* import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider import mozilla.components.browser.session.Session import mozilla.components.browser.toolbar.BrowserToolbar @@ -29,6 +27,7 @@ import org.mozilla.fenix.components.FenixSnackbar import org.mozilla.fenix.customtabs.CustomTabToolbarMenu import org.mozilla.fenix.ext.bookmarkStorage import org.mozilla.fenix.ext.components +import org.mozilla.fenix.ext.settings import org.mozilla.fenix.theme.ThemeManager interface BrowserToolbarViewInteractor { @@ -41,6 +40,7 @@ interface BrowserToolbarViewInteractor { class BrowserToolbarView( private val container: ViewGroup, + private val shouldUseBottomToolbar: Boolean, private val interactor: BrowserToolbarViewInteractor, private val customTabSession: Session? ) : LayoutContainer { @@ -48,12 +48,21 @@ class BrowserToolbarView( override val containerView: View? get() = container - private val urlBackground = LayoutInflater.from(container.context) - .inflate(R.layout.layout_url_background, container, false) - - val view: BrowserToolbar = LayoutInflater.from(container.context) - .inflate(R.layout.component_search, container, true) - .findViewById(R.id.toolbar) + val view: BrowserToolbar = if (container.context.settings().shouldUseBottomToolbar) { + LayoutInflater.from(container.context) + .inflate(R.layout.component_bottom_browser_toolbar, container, true) + .findViewById(R.id.toolbar_bottom) + } else { + if (container.context.settings().shouldUseFixedToolbar) { + LayoutInflater.from(container.context) + .inflate(R.layout.component_browser_top_toolbar_fixed, container, true) + .findViewById(R.id.toolbar_top_fixed) + } else { + LayoutInflater.from(container.context) + .inflate(R.layout.component_browser_bottom_toolbar, container, true) + .findViewById(R.id.toolbar_top) + } + } val toolbarIntegration: ToolbarIntegration @@ -180,6 +189,7 @@ class BrowserToolbarView( readerModeStateProvider = { sessionManager.selectedSession?.readerMode ?: false }, + shouldReverseItems = !shouldUseBottomToolbar, onItemTapped = { interactor.onBrowserToolbarMenuItemTapped(it) }, lifecycleOwner = container.context as AppCompatActivity, sessionManager = sessionManager, diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 2c2a1ced275c..8e98c713060a 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -12,15 +12,15 @@ import kotlinx.coroutines.launch import mozilla.components.browser.menu.BrowserMenuBuilder import mozilla.components.browser.menu.item.BrowserMenuDivider import mozilla.components.browser.menu.item.BrowserMenuHighlightableItem +import mozilla.components.browser.menu.item.BrowserMenuImageSwitch import mozilla.components.browser.menu.item.BrowserMenuImageText import mozilla.components.browser.menu.item.BrowserMenuItemToolbar -import mozilla.components.browser.menu.item.BrowserMenuImageSwitch import mozilla.components.browser.session.Session import mozilla.components.browser.session.SessionManager import mozilla.components.concept.storage.BookmarksStorage -import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R +import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.ext.asActivity import org.mozilla.fenix.ext.components import org.mozilla.fenix.theme.ThemeManager @@ -31,6 +31,7 @@ class DefaultToolbarMenu( private val context: Context, private val hasAccountProblem: Boolean = false, private val requestDesktopStateProvider: () -> Boolean = { false }, + private val shouldReverseItems: Boolean, private val onItemTapped: (ToolbarMenu.Item) -> Unit = {}, private val lifecycleOwner: LifecycleOwner, private val bookmarksStorage: BookmarksStorage, @@ -146,7 +147,7 @@ class DefaultToolbarMenu( fun shouldShowReaderAppearance(): Boolean = sessionManager.selectedSession?.readerMode ?: false - listOfNotNull( + val menuItems = listOfNotNull( help, settings, library, @@ -164,6 +165,8 @@ class DefaultToolbarMenu( BrowserMenuDivider(), menuToolbar ) + + if (shouldReverseItems) { menuItems.reversed() } else { menuItems } } private val help = BrowserMenuImageText( diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/EngineViewTopBehavior.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/EngineViewTopBehavior.kt new file mode 100644 index 000000000000..4e630e8e88ef --- /dev/null +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/EngineViewTopBehavior.kt @@ -0,0 +1,46 @@ +package org.mozilla.fenix.components.toolbar + +import android.annotation.SuppressLint +import android.content.Context +import android.util.AttributeSet +import android.view.View +import androidx.coordinatorlayout.widget.CoordinatorLayout +import mozilla.components.concept.engine.EngineView +import mozilla.components.support.ktx.android.view.findViewInHierarchy + +/** + * A [CoordinatorLayout.Behavior] implementation to be used with [EngineView] when placing a toolbar at the + * bottom of the screen. + * + * Using this behavior requires the toolbar to use the BrowserToolbarTopBehavior. + * + * This implementation will update the vertical clipping of the [EngineView] so that top-aligned web content will + * be drawn above the native toolbar. + */ +class EngineViewTopBehavior( + context: Context?, + attrs: AttributeSet? +) : CoordinatorLayout.Behavior(context, attrs) { + @SuppressLint("LogUsage") + override fun layoutDependsOn(parent: CoordinatorLayout, child: View, dependency: View): Boolean { + // This package does not have access to "BrowserToolbar" ... so we are just checking the class name here since + // we actually do not need anything from that class - we only need to identify the instance. + // Right now we do not have a component that has access to (concept/browser-toolbar and concept-engine). + // Creating one just for this behavior is too excessive. + if (dependency::class.java.simpleName == "BrowserToolbar") { + return true + } + + return super.layoutDependsOn(parent, child, dependency) + } + + /** + * Apply vertical clipping to [EngineView]. This requires [EngineViewTopehavior] to be set + * in/on the [EngineView] or its parent. Must be a direct descending child of [CoordinatorLayout]. + */ + override fun onDependentViewChanged(parent: CoordinatorLayout, child: View, dependency: View): Boolean { + val engineView = child.findViewInHierarchy { it is EngineView } as EngineView? + engineView?.setVerticalClipping(dependency.height - dependency.translationY.toInt()) + return true + } +} diff --git a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserFragment.kt index 891ca637c99d..52fa80863501 100644 --- a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserFragment.kt @@ -9,7 +9,7 @@ import android.view.Gravity import android.view.View import androidx.core.view.isGone import androidx.navigation.fragment.navArgs -import kotlinx.android.synthetic.main.component_search.* +import kotlinx.android.synthetic.main.component_browser_bottom_toolbar.* import kotlinx.android.synthetic.main.fragment_browser.view.* import kotlinx.coroutines.ExperimentalCoroutinesApi import mozilla.components.browser.session.Session @@ -64,7 +64,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler { customTabsIntegration.set( feature = CustomTabsIntegration( sessionManager = requireComponents.core.sessionManager, - toolbar = toolbar, + toolbar = toolbar_top, sessionId = customTabSessionId, activity = activity, engineLayout = view.swipeRefresh, @@ -86,14 +86,14 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler { hideToolbarFeature.set( feature = WebAppHideToolbarFeature( requireComponents.core.sessionManager, - toolbar, + toolbar_top, customTabSessionId, trustedScopes ) { toolbarVisible -> updateLayoutMargins(inFullScreen = !toolbarVisible) }, owner = this, - view = toolbar + view = toolbar_top ) if (manifest != null) { @@ -187,7 +187,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler { } override fun getEngineMargins(): Pair { - val toolbarHidden = toolbar.isGone + val toolbarHidden = toolbar_top.isGone return if (toolbarHidden) { 0 to 0 } else { diff --git a/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt b/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt index 1d4cd214aa94..1677ef577833 100644 --- a/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt +++ b/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt @@ -19,6 +19,7 @@ import mozilla.components.feature.toolbar.ToolbarAutocompleteFeature import mozilla.components.support.ktx.android.util.dpToPx import org.mozilla.fenix.R import org.mozilla.fenix.ext.getColorFromAttr +import org.mozilla.fenix.ext.settings import org.mozilla.fenix.search.SearchFragmentState /** @@ -58,9 +59,21 @@ class ToolbarView( override val containerView: View? get() = container - val view: BrowserToolbar = LayoutInflater.from(container.context) - .inflate(R.layout.component_search, container, true) - .findViewById(R.id.toolbar) + val view: BrowserToolbar = if (container.context.settings().shouldUseBottomToolbar) { + LayoutInflater.from(container.context) + .inflate(R.layout.component_bottom_browser_toolbar, container, true) + .findViewById(R.id.toolbar_bottom) + } else { + if (container.context.settings().shouldUseFixedToolbar) { + LayoutInflater.from(container.context) + .inflate(R.layout.component_browser_bottom_toolbar, container, true) + .findViewById(R.id.toolbar_top_fixed) + } else { + LayoutInflater.from(container.context) + .inflate(R.layout.component_browser_bottom_toolbar, container, true) + .findViewById(R.id.toolbar_top) + } + } private var isInitialized = false diff --git a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt index cbb9f3b25dde..c2b7bcde79be 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt @@ -117,16 +117,8 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver { (activity as AppCompatActivity).supportActionBar?.show() setSummaryAndTitleStrings() - setupPreferences() - - updateAccountUIState( - context!!, - requireComponents.backgroundServices.accountManager.accountProfile() - ) - - updatePreferenceVisibilityForFeatureFlags() } - + private fun setSummaryAndTitleStrings() { val trackingProtectionPreference = findPreference(getPreferenceKey(pref_key_tracking_protection_settings)) @@ -168,6 +160,15 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver { isVisible = !PrivateShortcutCreateManager.doesPrivateBrowsingPinnedShortcutExist(context) } + + setupPreferences() + + updateAccountUIState( + context!!, + requireComponents.backgroundServices.accountManager.accountProfile() + ) + + updatePreferenceVisibilityForFeatureFlags() } private fun updatePreferenceVisibilityForFeatureFlags() { diff --git a/app/src/main/java/org/mozilla/fenix/settings/ToolbarSettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/ToolbarSettingsFragment.kt index b1c16bf01c1d..75447a8b9f81 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/ToolbarSettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/ToolbarSettingsFragment.kt @@ -12,7 +12,7 @@ import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.getPreferenceKey -class ToolbarSettingsFragment: PreferenceFragmentCompat() { +class ToolbarSettingsFragment : PreferenceFragmentCompat() { private lateinit var topPreference: RadioButtonPreference private lateinit var bottomPreference: RadioButtonPreference diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt index 4f90b20e2574..df05e9793f5d 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -8,6 +8,7 @@ import android.app.Application import android.content.Context import android.content.Context.MODE_PRIVATE import android.content.SharedPreferences +import android.view.accessibility.AccessibilityManager import androidx.annotation.VisibleForTesting import androidx.annotation.VisibleForTesting.PRIVATE import mozilla.components.feature.sitepermissions.SitePermissionsRules @@ -198,6 +199,12 @@ class Settings private constructor( true ) + val shouldUseFixedToolbar: Boolean + get() { + val accessibilityManager = appContext.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager + return accessibilityManager?.isTouchExplorationEnabled ?: false + } + var shouldDeleteBrowsingDataOnQuit by booleanPreference( appContext.getPreferenceKey(R.string.pref_key_delete_browsing_data_on_quit), default = false diff --git a/app/src/main/res/layout/component_search.xml b/app/src/main/res/layout/component_bottom_browser_toolbar.xml similarity index 86% rename from app/src/main/res/layout/component_search.xml rename to app/src/main/res/layout/component_bottom_browser_toolbar.xml index a6f1a508ddc8..7dc046003ce7 100644 --- a/app/src/main/res/layout/component_search.xml +++ b/app/src/main/res/layout/component_bottom_browser_toolbar.xml @@ -2,9 +2,10 @@ - + + + + diff --git a/app/src/main/res/layout/component_browser_top_toolbar_fixed.xml b/app/src/main/res/layout/component_browser_top_toolbar_fixed.xml new file mode 100644 index 000000000000..1e12e5a33eae --- /dev/null +++ b/app/src/main/res/layout/component_browser_top_toolbar_fixed.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_browser.xml b/app/src/main/res/layout/fragment_browser.xml index 80a9d1fe3f95..0f6f70d496b8 100644 --- a/app/src/main/res/layout/fragment_browser.xml +++ b/app/src/main/res/layout/fragment_browser.xml @@ -14,8 +14,7 @@ android:id="@+id/swipeRefresh" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginBottom="@dimen/browser_toolbar_height"> - + app:layout_behavior="@string/appbar_scrolling_view_behavior">
  • position: A string that indicates the new position of the toolbar TOP or BOTTOM
  • |2020-03-01 | +| toolbar_settings.changed_position |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The user selected a new position for the toolbar |[1](https://github.com/mozilla-mobile/fenix/pull/6571)|
    • position: A string that indicates the new position of the toolbar TOP or BOTTOM
    |2020-03-01 | | tracking_protection.etp_setting_changed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user changed their tracking protection level setting to either strict or standard. |[1](https://github.com/mozilla-mobile/fenix/pull/5414#issuecomment-532847188)|
    • etp_setting: The new setting for ETP: strict, standard
    |2020-03-01 | | tracking_protection.etp_settings |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened tracking protection settings through settings. |[1](https://github.com/mozilla-mobile/fenix/pull/5414#issuecomment-532847188)||2020-03-01 | | tracking_protection.etp_shield |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the tracking protection shield icon in toolbar. |[1](https://github.com/mozilla-mobile/fenix/pull/5414#issuecomment-532847188)||2020-03-01 |