Start ripping out the custom tab tray that I lack the resources to maintain
parent
39bb01f3c9
commit
7b9eaa9304
@ -1,50 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlinx.android.synthetic.main.onboarding_tabs_tray_layout.view.*
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||
import org.mozilla.fenix.utils.view.addToRadioGroup
|
||||
|
||||
class OnboardingTabsTrayLayoutViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
private var fennecStyleTabsScreen: OnboardingRadioButton = view.tabs_tray_fennec_style
|
||||
private var fenixStyleTabsTray: OnboardingRadioButton = view.tabs_tray_fenix_style
|
||||
|
||||
init {
|
||||
addToRadioGroup(fennecStyleTabsScreen, fenixStyleTabsTray)
|
||||
|
||||
fennecStyleTabsScreen.isChecked =
|
||||
itemView.context.settings().shouldUseFennecStyleTabsScreen
|
||||
fenixStyleTabsTray.isChecked =
|
||||
!itemView.context.settings().shouldUseFennecStyleTabsScreen
|
||||
|
||||
fennecStyleTabsScreen.onClickListener {
|
||||
setFennecStyleTabsScreen(true)
|
||||
}
|
||||
|
||||
fenixStyleTabsTray.onClickListener {
|
||||
setFennecStyleTabsScreen(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setFennecStyleTabsScreen(enabled: Boolean) {
|
||||
itemView.context.settings().apply {
|
||||
enableCompactTabs = enabled
|
||||
useFullScreenTabScreen = enabled
|
||||
reverseTabOrderInTabsTray = !enabled
|
||||
useNewTabFloatingActionButton = !enabled
|
||||
placeNewTabFloatingActionButtonAtTop = false
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val LAYOUT_ID = R.layout.onboarding_tabs_tray_layout
|
||||
}
|
||||
}
|
@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tab_wrapper"
|
||||
style="@style/TopSheetModal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@color/foundation_normal_theme">
|
||||
|
||||
<View
|
||||
android:id="@+id/handle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone"
|
||||
android:background="@color/secondary_text_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.1" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/infoBanner"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/topBar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_tray_empty_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="80dp"
|
||||
android:text="@string/no_open_tabs_description"
|
||||
android:textColor="?secondaryText"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/infoBanner" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/handle">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exit_multi_select"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_close_multiselect_content_description"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/multiselect_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/multiselect_title"
|
||||
app:srcCompat="@drawable/ic_close"
|
||||
app:tint="@color/contrast_text_normal_theme" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multiselect_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/collect_multi_select"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@id/exit_multi_select"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="3 selected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/collect_multi_select"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_collection_button_multiselect_content_description"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/tab_tray_save_to_collection"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:drawableStartCompat="@drawable/ic_tab_collection"
|
||||
app:drawableTint="@color/contrast_text_normal_theme"
|
||||
app:fontFamily="@font/metropolis_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exit_tabs_screen"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tabs_screen_close_screen_description"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:srcCompat="@drawable/mozac_ic_back"
|
||||
app:tint="@color/primary_text_normal_theme" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintStart_toEndOf="@id/exit_tabs_screen"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.35"
|
||||
app:tabGravity="fill"
|
||||
app:tabIconTint="@color/tab_icon"
|
||||
app:tabIndicatorColor="@color/accent_normal_theme"
|
||||
app:tabIndicatorGravity="top"
|
||||
app:tabRippleColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/default_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tab_header_label"
|
||||
android:layout="@layout/tabs_tray_tab_counter"
|
||||
app:tabIconTint="@color/tab_icon" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/private_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tabs_header_private_tabs_title"
|
||||
android:icon="@drawable/ic_private_browsing" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_new_tab"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/add_tab"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toStartOf="@id/tab_tray_overflow"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:tint="@color/primary_text_normal_theme"
|
||||
app:srcCompat="@drawable/ic_new" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_overflow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/open_tabs_menu"
|
||||
android:visibility="visible"
|
||||
app:tint="@color/accent_normal_theme"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:srcCompat="@drawable/ic_menu" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/tab_tray_item_divider_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/infoBanner" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tabsTray"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/divider" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,204 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tab_wrapper"
|
||||
style="@style/BottomSheetModal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@color/foundation_normal_theme">
|
||||
|
||||
<View
|
||||
android:id="@+id/handle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/bottom_sheet_handle_height"
|
||||
android:layout_marginTop="@dimen/bottom_sheet_handle_top_margin"
|
||||
android:visibility="gone"
|
||||
android:background="@color/secondary_text_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.1" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/infoBanner"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintTop_toBottomOf="@id/topBar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_tray_empty_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="80dp"
|
||||
android:text="@string/no_open_tabs_description"
|
||||
android:textColor="?secondaryText"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/infoBanner" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintTop_toBottomOf="@id/handle">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exit_multi_select"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_close_multiselect_content_description"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/multiselect_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/multiselect_title"
|
||||
app:srcCompat="@drawable/ic_close"
|
||||
app:tint="@color/contrast_text_normal_theme" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multiselect_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/collect_multi_select"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@id/exit_multi_select"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="3 selected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/collect_multi_select"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_collection_button_multiselect_content_description"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/tab_tray_save_to_collection"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:drawableStartCompat="@drawable/ic_tab_collection"
|
||||
app:drawableTint="@color/contrast_text_normal_theme"
|
||||
app:fontFamily="@font/metropolis_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exit_tabs_screen"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tabs_screen_close_screen_description"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:srcCompat="@drawable/mozac_ic_back"
|
||||
app:tint="@color/primary_text_normal_theme" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintStart_toEndOf="@id/exit_tabs_screen"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.35"
|
||||
app:tabGravity="fill"
|
||||
app:tabIconTint="@color/tab_icon"
|
||||
app:tabIndicatorColor="@color/accent_normal_theme"
|
||||
app:tabRippleColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/default_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tab_header_label"
|
||||
android:layout="@layout/tabs_tray_tab_counter"
|
||||
app:tabIconTint="@color/tab_icon" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/private_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tabs_header_private_tabs_title"
|
||||
android:icon="@drawable/ic_private_browsing" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_new_tab"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/add_tab"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toStartOf="@id/tab_tray_overflow"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:tint="@color/primary_text_normal_theme"
|
||||
app:srcCompat="@drawable/ic_new" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_overflow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/open_tabs_menu"
|
||||
android:visibility="visible"
|
||||
app:tint="@color/accent_normal_theme"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:srcCompat="@drawable/ic_menu" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/tab_tray_item_divider_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/infoBanner" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tabsTray"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="140dp"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/new_tab_button"
|
||||
style="@style/TabTrayFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|end"
|
||||
android:scrollbars="none"
|
||||
android:layout_margin="16dp"
|
||||
android:backgroundTint="@color/accent_normal_theme"
|
||||
android:contentDescription="@string/add_tab"
|
||||
android:elevation="99dp"
|
||||
android:text="@string/tab_drawer_fab_content"
|
||||
android:textColor="@color/photonWhite"
|
||||
app:elevation="99dp"
|
||||
app:borderWidth="0dp"
|
||||
app:icon="@drawable/ic_new"
|
||||
app:iconTint="@color/photonWhite" />
|
@ -1,190 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tab_wrapper"
|
||||
style="@style/TopSheetModal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@color/foundation_normal_theme"
|
||||
app:layout_behavior="org.mozilla.fenix.components.topsheet.TopSheetBehavior">
|
||||
|
||||
<View
|
||||
android:id="@+id/handle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@color/secondary_text_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.1" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/infoBanner"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/topBar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_tray_empty_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="80dp"
|
||||
android:text="@string/no_open_tabs_description"
|
||||
android:textColor="?secondaryText"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/infoBanner" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
tools:ignore="MozMultipleConstraintLayouts"
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/handle">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exit_multi_select"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_close_multiselect_content_description"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/multiselect_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/multiselect_title"
|
||||
app:srcCompat="@drawable/ic_close"
|
||||
app:tint="@color/contrast_text_normal_theme" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multiselect_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/collect_multi_select"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@id/exit_multi_select"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="3 selected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/collect_multi_select"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/tab_tray_collection_button_multiselect_content_description"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/tab_tray_save_to_collection"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/contrast_text_normal_theme"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:drawableStartCompat="@drawable/ic_tab_collection"
|
||||
app:drawableTint="@color/contrast_text_normal_theme"
|
||||
app:fontFamily="@font/metropolis_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@color/foundation_normal_theme"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.5"
|
||||
app:tabGravity="fill"
|
||||
app:tabIconTint="@color/tab_icon"
|
||||
app:tabIndicatorColor="@color/accent_normal_theme"
|
||||
app:tabIndicatorGravity="top"
|
||||
app:tabRippleColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/default_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tab_header_label"
|
||||
android:layout="@layout/tabs_tray_tab_counter"
|
||||
app:tabIconTint="@color/tab_icon" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/private_tab_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/tabs_header_private_tabs_title"
|
||||
android:icon="@drawable/ic_private_browsing" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_new_tab"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/add_tab"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toStartOf="@id/tab_tray_overflow"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:tint="@color/primary_text_normal_theme"
|
||||
app:srcCompat="@drawable/ic_new" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/tab_tray_overflow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/open_tabs_menu"
|
||||
android:visibility="visible"
|
||||
app:tint="@color/accent_normal_theme"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_layout"
|
||||
app:srcCompat="@drawable/ic_menu" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/tab_tray_item_divider_normal_theme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/infoBanner" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tabsTray"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/divider" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/onboarding_card"
|
||||
style="@style/OnboardingCardLightWithPadding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/header_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:text="@string/onboarding_tabs_layout_header"
|
||||
android:textAppearance="@style/HeaderTextStyle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textAppearance="@style/Body14TextStyle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_text"
|
||||
android:text="@string/onboarding_tabs_tray_layout_description" />
|
||||
|
||||
|
||||
<org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||
android:id="@+id/tabs_tray_fennec_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:checked="true"
|
||||
android:foreground="@drawable/rounded_ripple"
|
||||
android:gravity="top"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:theme="@style/Checkable.Colored"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/description_text"
|
||||
app:onboardingKey="@string/pref_key_use_fullscreen_tabs_screen"
|
||||
app:onboardingKeyDescription="@string/onboarding_tabs_tray_fennec_layout_description"
|
||||
app:onboardingKeyTitle="@string/onboarding_tabs_tray_fennec_layout_button"
|
||||
tools:text="Standard" />
|
||||
|
||||
<org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||
android:id="@+id/tabs_tray_fenix_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:checked="false"
|
||||
android:foreground="@drawable/rounded_ripple"
|
||||
android:gravity="top"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textColor="@color/primary_state_list_text_color"
|
||||
android:theme="@style/Checkable.Colored"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tabs_tray_fennec_style"
|
||||
app:onboardingKey="@string/pref_key_use_fenix_tabs_tray"
|
||||
app:onboardingKeyDescription="@string/onboarding_tabs_tray_fenix_layout_description"
|
||||
app:onboardingKeyTitle="@string/onboarding_tabs_tray_fenix_layout_button"
|
||||
tools:text="Strict" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tab_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="165dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:selectableItemBackground">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/play_pause_button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/mozac_feature_media_notification_action_pause"
|
||||
android:elevation="10dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/media_state_play" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mozac_browser_tabstray_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_tray_thumbnail_height"
|
||||
android:layout_marginHorizontal="7dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:backgroundTint="?tabTrayThumbnailItemBackground"
|
||||
app:cardBackgroundColor="@color/photonWhite"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/default_tab_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="22dp"
|
||||
app:srcCompat="@drawable/mozac_ic_globe"
|
||||
app:tint="?tabTrayThumbnailIcon" />
|
||||
|
||||
<mozilla.components.browser.tabstray.thumbnail.TabThumbnailView
|
||||
android:id="@+id/mozac_browser_tabstray_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/mozac_browser_tabstray_open_tab" />
|
||||
|
||||
<include layout="@layout/checkbox_item" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mozac_browser_tabstray_icon_card"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintStart_toStartOf="@id/mozac_browser_tabstray_card"
|
||||
app:layout_constraintBottom_toTopOf="@id/mozac_browser_tabstray_card"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:cardCornerRadius="5dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mozac_browser_tabstray_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mozac_browser_tabstray_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:fadingEdgeLength="25dp"
|
||||
android:ellipsize="none"
|
||||
android:singleLine="true"
|
||||
android:paddingHorizontal="7dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:textColor="@color/tab_tray_item_text_normal_theme"
|
||||
android:textSize="14sp"
|
||||
android:visibility="visible"
|
||||
tools:text="Example Domain"
|
||||
app:layout_constraintEnd_toStartOf="@id/mozac_browser_tabstray_close"
|
||||
app:layout_constraintStart_toEndOf="@id/mozac_browser_tabstray_icon_card"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mozac_browser_tabstray_url"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:lines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:textColor="@color/tab_tray_item_url_normal_theme"
|
||||
android:textSize="14sp"
|
||||
tools:text="example.com"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toStartOf="@id/mozac_browser_tabstray_close"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@id/mozac_browser_tabstray_card"
|
||||
app:layout_constraintTop_toBottomOf="@id/mozac_browser_tabstray_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/mozac_browser_tabstray_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/close_tab"
|
||||
app:layout_constraintEnd_toEndOf="@id/mozac_browser_tabstray_card"
|
||||
app:layout_constraintBottom_toTopOf="@id/mozac_browser_tabstray_card"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/mozac_ic_close"
|
||||
app:tint="@color/tab_tray_item_text_normal_theme" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue