|
|
|
@ -12,12 +12,14 @@ import android.view.View
|
|
|
|
|
import android.widget.FrameLayout
|
|
|
|
|
import androidx.appcompat.content.res.AppCompatResources
|
|
|
|
|
import androidx.core.view.doOnNextLayout
|
|
|
|
|
import androidx.core.view.isVisible
|
|
|
|
|
import androidx.core.view.updateLayoutParams
|
|
|
|
|
import mozilla.components.browser.state.selector.getNormalOrPrivateTabs
|
|
|
|
|
import mozilla.components.browser.state.selector.selectedTab
|
|
|
|
|
import mozilla.components.browser.thumbnails.loader.ThumbnailLoader
|
|
|
|
|
import mozilla.components.concept.base.images.ImageLoadRequest
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.components.toolbar.IncompleteRedesignToolbarFeature
|
|
|
|
|
import org.mozilla.fenix.components.toolbar.ToolbarPosition
|
|
|
|
|
import org.mozilla.fenix.databinding.TabPreviewBinding
|
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
@ -46,6 +48,10 @@ class TabPreview @JvmOverloads constructor(
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val isNavBarEnabled = IncompleteRedesignToolbarFeature(context.settings()).isEnabled
|
|
|
|
|
binding.tabButton.isVisible = !isNavBarEnabled
|
|
|
|
|
binding.menuButton.isVisible = !isNavBarEnabled
|
|
|
|
|
|
|
|
|
|
// Change view properties to avoid confusing the UI tests
|
|
|
|
|
binding.tabButton.findViewById<View>(R.id.counter_box).id = View.NO_ID
|
|
|
|
|
binding.tabButton.findViewById<View>(R.id.counter_text).id = View.NO_ID
|
|
|
|
|