Merge pull request #69 from abhijitvalluri/tabstray_fixes
Fix some issues with tabs tray + enable proper Fennec style full screen layout + add onboarding setup for tabs tray layoutpull/76/head
commit
625289da6e
@ -0,0 +1,54 @@
|
|||||||
|
/* 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.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.components.metrics.Event.OnboardingTrackingProtection.Setting
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,191 @@
|
|||||||
|
<?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" />
|
||||||
|
|
||||||
|
<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/divider" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
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: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/topBar" />
|
||||||
|
|
||||||
|
<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>
|
@ -0,0 +1,192 @@
|
|||||||
|
<?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="3dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
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" />
|
||||||
|
|
||||||
|
<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/topBar" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
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: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/topBar" />
|
||||||
|
|
||||||
|
<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>
|
@ -0,0 +1,83 @@
|
|||||||
|
<?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>
|
Loading…
Reference in New Issue