2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-09 19:10:42 +00:00

For #15788: Remove nested constraint layout in tabs tray.

This commit is contained in:
mcarare 2020-11-18 15:52:16 +02:00 committed by ekager
parent cf162c69d1
commit 519885da43
2 changed files with 92 additions and 93 deletions

View File

@ -47,105 +47,104 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/infoBanner" /> app:layout_constraintTop_toBottomOf="@id/infoBanner" />
<androidx.constraintlayout.widget.ConstraintLayout <View
android:id="@+id/topBar" android:id="@+id/topBar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="80dp"
android:background="@color/foundation_normal_theme" android:background="@color/foundation_normal_theme"
android:importantForAccessibility="no" android:importantForAccessibility="no"
app:layout_constraintTop_toBottomOf="@+id/handle"> app:layout_constraintTop_toBottomOf="@+id/handle" />
<ImageButton <ImageButton
android:id="@+id/exit_multi_select" android:id="@+id/exit_multi_select"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/tab_tray_close_multiselect_content_description" android:contentDescription="@string/tab_tray_close_multiselect_content_description"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/multiselect_title" app:layout_constraintBottom_toBottomOf="@+id/multiselect_title"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/multiselect_title" app:layout_constraintTop_toTopOf="@+id/multiselect_title"
app:srcCompat="@drawable/ic_close" app:srcCompat="@drawable/ic_close"
app:tint="@color/contrast_text_normal_theme" /> app:tint="@color/contrast_text_normal_theme" />
<TextView <TextView
android:id="@+id/multiselect_title" android:id="@+id/multiselect_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:focusableInTouchMode="true"
android:textColor="@color/contrast_text_normal_theme"
android:textSize="20sp"
app:fontFamily="@font/metropolis_semibold"
app:layout_constraintBottom_toBottomOf="@id/topBar"
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="@id/topBar"
tools:text="3 selected" />
<include layout="@layout/tabstray_multiselect_items" />
<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_toBottomOf="@id/handle"
app:layout_constraintWidth_percent="0.5"
app:tabGravity="fill"
app:tabIconTint="@color/tab_icon"
app:tabIndicatorColor="@color/accent_normal_theme"
app:tabMaxWidth="0dp"
app:tabRippleColor="@android:color/transparent">
<com.google.android.material.tabs.TabItem
android:id="@+id/default_tab_item"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginStart="12dp" android:contentDescription="@string/tab_header_label"
android:textColor="@color/contrast_text_normal_theme" android:layout="@layout/tabs_tray_tab_counter"
android:textSize="20sp" app:tabIconTint="@color/tab_icon" />
app:fontFamily="@font/metropolis_semibold"
android:focusableInTouchMode="true"
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" />
<include layout="@layout/tabstray_multiselect_items" /> <com.google.android.material.tabs.TabItem
android:id="@+id/private_tab_item"
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="80dp" android:layout_height="match_parent"
android:background="@color/foundation_normal_theme" android:contentDescription="@string/tabs_header_private_tabs_title"
app:layout_constraintStart_toStartOf="parent" android:icon="@drawable/ic_private_browsing" />
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:tabMaxWidth="0dp"
app:tabRippleColor="@android:color/transparent">
<com.google.android.material.tabs.TabItem </com.google.android.material.tabs.TabLayout>
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 <ImageButton
android:id="@+id/private_tab_item" android:id="@+id/tab_tray_new_tab"
android:layout_width="0dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="48dp"
android:contentDescription="@string/tabs_header_private_tabs_title" android:background="?android:attr/selectableItemBackgroundBorderless"
android:icon="@drawable/ic_private_browsing" /> android:contentDescription="@string/add_tab"
android:visibility="gone"
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"
app:tint="@color/primary_text_normal_theme" />
</com.google.android.material.tabs.TabLayout> <ImageButton
android:id="@+id/tab_tray_overflow"
<ImageButton android:layout_width="48dp"
android:id="@+id/tab_tray_new_tab" android:layout_height="48dp"
android:layout_width="48dp" android:layout_marginEnd="0dp"
android:layout_height="48dp" android:background="?android:attr/selectableItemBackgroundBorderless"
android:background="?android:attr/selectableItemBackgroundBorderless" android:contentDescription="@string/open_tabs_menu"
android:contentDescription="@string/add_tab" android:visibility="visible"
android:visibility="gone" app:layout_constraintBottom_toBottomOf="@id/tab_layout"
app:layout_constraintBottom_toBottomOf="@id/tab_layout" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/tab_tray_overflow" app:layout_constraintTop_toTopOf="@id/tab_layout"
app:layout_constraintTop_toTopOf="@id/tab_layout" app:srcCompat="@drawable/ic_menu"
app:srcCompat="@drawable/ic_new" app:tint="@color/tab_tray_heading_icon_menu_normal_theme" />
app:tint="@color/primary_text_normal_theme" />
<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:layout_constraintBottom_toBottomOf="@id/tab_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_layout"
app:srcCompat="@drawable/ic_menu"
app:tint="@color/tab_tray_heading_icon_menu_normal_theme" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:id="@+id/divider" android:id="@+id/divider"

View File

@ -16,9 +16,9 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/tab_tray_collection_button_multiselect_content_description" android:contentDescription="@string/tab_tray_collection_button_multiselect_content_description"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@id/topBar"
app:layout_constraintEnd_toStartOf="@id/share_multi_select" app:layout_constraintEnd_toStartOf="@id/share_multi_select"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="@id/topBar"
app:srcCompat="@drawable/ic_tab_collection" app:srcCompat="@drawable/ic_tab_collection"
app:tint="@color/contrast_text_normal_theme" /> app:tint="@color/contrast_text_normal_theme" />
@ -29,9 +29,9 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/tab_tray_multiselect_share_content_description" android:contentDescription="@string/tab_tray_multiselect_share_content_description"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@id/topBar"
app:layout_constraintEnd_toStartOf="@id/menu_multi_select" app:layout_constraintEnd_toStartOf="@id/menu_multi_select"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="@id/topBar"
app:srcCompat="@drawable/ic_share_filled" app:srcCompat="@drawable/ic_share_filled"
app:tint="@color/contrast_text_normal_theme" /> app:tint="@color/contrast_text_normal_theme" />
@ -42,9 +42,9 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/tab_tray_multiselect_menu_content_description" android:contentDescription="@string/tab_tray_multiselect_menu_content_description"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@id/topBar"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="@id/topBar"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="@id/topBar"
app:srcCompat="@drawable/ic_menu" app:srcCompat="@drawable/ic_menu"
app:tint="@color/contrast_text_normal_theme" /> app:tint="@color/contrast_text_normal_theme" />
</merge> </merge>