[fenix] For https://github.com/mozilla-mobile/fenix/issues/19938: Remove a11y workaro...
[gecko.git] / mobile / android / fenix / app / src / main / res / layout / component_tabstray2.xml
bloba14b3354f3b428cdf65b63a98cfcbff12ad14c47
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3    - License, v. 2.0. If a copy of the MPL was not distributed with this
4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
6     xmlns:app="http://schemas.android.com/apk/res-auto"
7     xmlns:tools="http://schemas.android.com/tools"
8     android:id="@+id/tab_wrapper"
9     style="@style/BottomSheetModal"
10     android:layout_width="match_parent"
11     android:layout_height="match_parent"
12     android:backgroundTint="@color/foundation_normal_theme"
13     app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
14     tools:ignore="MozMultipleConstraintLayouts">
16     <View
17         android:id="@+id/handle"
18         android:layout_width="0dp"
19         android:layout_height="@dimen/bottom_sheet_handle_height"
20         android:layout_marginTop="@dimen/bottom_sheet_handle_top_margin"
21         android:background="@color/secondary_text_normal_theme"
22         app:layout_constraintEnd_toEndOf="parent"
23         app:layout_constraintStart_toStartOf="parent"
24         app:layout_constraintTop_toTopOf="parent"
25         app:layout_constraintWidth_percent="0.1" />
27     <androidx.constraintlayout.widget.ConstraintLayout
28         android:id="@+id/info_banner"
29         android:layout_width="match_parent"
30         android:layout_height="wrap_content"
31         android:background="@color/foundation_normal_theme"
32         android:visibility="gone"
33         app:layout_constraintTop_toBottomOf="@+id/topBar" />
35     <View
36         android:id="@+id/topBar"
37         android:layout_width="match_parent"
38         android:layout_height="80dp"
39         android:background="@color/foundation_normal_theme"
40         android:importantForAccessibility="no"
41         app:layout_constraintTop_toBottomOf="@+id/handle" />
43     <ImageButton
44         android:id="@+id/exit_multi_select"
45         android:layout_width="48dp"
46         android:layout_height="48dp"
47         android:layout_marginStart="0dp"
48         android:background="?android:attr/selectableItemBackgroundBorderless"
49         android:contentDescription="@string/tab_tray_close_multiselect_content_description"
50         android:visibility="gone"
51         app:layout_constraintBottom_toBottomOf="@+id/multiselect_title"
52         app:layout_constraintStart_toStartOf="parent"
53         app:layout_constraintTop_toTopOf="@+id/multiselect_title"
54         app:srcCompat="@drawable/ic_close"
55         app:tint="@color/contrast_text_normal_theme" />
57     <TextView
58         android:id="@+id/multiselect_title"
59         android:layout_width="0dp"
60         android:layout_height="wrap_content"
61         android:layout_marginStart="12dp"
62         android:focusableInTouchMode="true"
63         android:textColor="@color/contrast_text_normal_theme"
64         android:textSize="20sp"
65         app:fontFamily="@font/metropolis_semibold"
66         app:layout_constraintBottom_toBottomOf="@id/topBar"
67         app:layout_constraintEnd_toStartOf="@id/collect_multi_select"
68         app:layout_constraintHorizontal_bias="0.0"
69         app:layout_constraintHorizontal_chainStyle="packed"
70         app:layout_constraintStart_toEndOf="@+id/exit_multi_select"
71         app:layout_constraintTop_toTopOf="@id/topBar"
72         tools:text="3 selected" />
74     <include layout="@layout/tabstray_multiselect_items" />
76     <com.google.android.material.tabs.TabLayout
77         android:id="@+id/tab_layout"
78         android:layout_width="0dp"
79         android:layout_height="80dp"
80         android:background="@color/foundation_normal_theme"
81         app:layout_constraintStart_toStartOf="parent"
82         app:layout_constraintTop_toBottomOf="@id/handle"
83         app:layout_constraintWidth_percent="0.5"
84         app:tabGravity="fill"
85         app:tabIconTint="@color/tab_icon"
86         app:tabIndicatorColor="@color/accent_normal_theme"
87         app:tabMaxWidth="0dp"
88         app:tabRippleColor="@android:color/transparent">
90         <com.google.android.material.tabs.TabItem
91             android:id="@+id/default_tab_item"
92             android:layout_width="0dp"
93             android:layout_height="match_parent"
94             android:contentDescription="@string/tab_header_label"
95             android:layout="@layout/tabs_tray_tab_counter2" />
97         <com.google.android.material.tabs.TabItem
98             android:id="@+id/private_tab_item"
99             android:layout_width="0dp"
100             android:layout_height="match_parent"
101             android:contentDescription="@string/tabs_header_private_tabs_title"
102             android:icon="@drawable/ic_private_browsing" />
104         <com.google.android.material.tabs.TabItem
105             android:id="@+id/synced_tab_item"
106             android:layout_width="0dp"
107             android:layout_height="match_parent"
108             android:contentDescription="@string/tabs_header_synced_tabs_title"
109             android:foregroundTint="@color/photonWhite"
110             android:icon="@drawable/ic_synced_tabs" />
112     </com.google.android.material.tabs.TabLayout>
114     <ImageButton
115         android:id="@+id/tab_tray_overflow"
116         android:layout_width="48dp"
117         android:layout_height="48dp"
118         android:layout_marginEnd="0dp"
119         android:background="?android:attr/selectableItemBackgroundBorderless"
120         android:contentDescription="@string/open_tabs_menu"
121         android:visibility="visible"
122         app:layout_constraintBottom_toBottomOf="@id/tab_layout"
123         app:layout_constraintEnd_toEndOf="parent"
124         app:layout_constraintTop_toTopOf="@id/tab_layout"
125         app:srcCompat="@drawable/ic_menu"
126         app:tint="@color/tab_tray_heading_icon_menu_normal_theme" />
128     <View
129         android:id="@+id/divider"
130         android:layout_width="0dp"
131         android:layout_height="1dp"
132         android:background="@color/tab_tray_item_divider_normal_theme"
133         app:layout_constraintEnd_toEndOf="parent"
134         app:layout_constraintStart_toStartOf="parent"
135         app:layout_constraintTop_toBottomOf="@+id/info_banner" />
137     <androidx.viewpager2.widget.ViewPager2
138         android:id="@+id/tabsTray"
139         android:layout_width="0dp"
140         android:layout_height="0dp"
141         android:scrollbarStyle="outsideOverlay"
142         android:scrollbars="vertical"
143         android:orientation="horizontal"
144         app:layout_constraintBottom_toBottomOf="parent"
145         app:layout_constraintEnd_toEndOf="parent"
146         app:layout_constraintStart_toStartOf="parent"
147         app:layout_constraintTop_toBottomOf="@+id/divider" />
149 </androidx.constraintlayout.widget.ConstraintLayout>