pull/600/head
Elise Richards 4 years ago committed by GitHub
parent 28d0d32a53
commit 0f3b3668db

@ -7,6 +7,8 @@ package org.mozilla.fenix.tabtray
import android.content.Context import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.ViewGroup import android.view.ViewGroup
import android.view.accessibility.AccessibilityEvent import android.view.accessibility.AccessibilityEvent
import androidx.annotation.IdRes import androidx.annotation.IdRes
@ -125,12 +127,12 @@ class TabTrayView(
} }
behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() { behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
override fun onSlide(bottomSheet: View, slideOffset: Float) { override fun onSlide(bottomSheet: View, slideOffset: Float) {
if (interactor.onModeRequested() is Mode.Normal && !hasAccessibilityEnabled) { if (
if (slideOffset >= SLIDE_OFFSET) { interactor.onModeRequested() is Mode.Normal &&
fabView.new_tab_button.show() !hasAccessibilityEnabled &&
} else { slideOffset >= SLIDE_OFFSET
fabView.new_tab_button.hide() ) {
} fabView.new_tab_button.show()
} }
} }
@ -312,7 +314,7 @@ class TabTrayView(
} }
infoBanner?.apply { infoBanner?.apply {
view.infoBanner.visibility = View.VISIBLE view.infoBanner.visibility = VISIBLE
showBanner() showBanner()
} }
} }
@ -579,9 +581,9 @@ class TabTrayView(
} }
view.tabsTray.visibility = if (hasNoTabs) { view.tabsTray.visibility = if (hasNoTabs) {
View.INVISIBLE INVISIBLE
} else { } else {
View.VISIBLE VISIBLE
} }
counter_text.text = updateTabCounter(browserState.normalTabs.size) counter_text.text = updateTabCounter(browserState.normalTabs.size)

@ -2,7 +2,8 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton xmlns:android="http://schemas.android.com/apk/res/android" <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/new_tab_button" android:id="@+id/new_tab_button"
style="@style/TabTrayFab" style="@style/TabTrayFab"

Loading…
Cancel
Save