1
0
Fork 0

Closes #546 - Uses Minimum Touch Target Size for Tab Header Buttons

master
Emily Kager 2019-02-15 16:35:50 -08:00 committed by Colin Lee
parent 927c1bdc85
commit 3f52178420
1 changed files with 42 additions and 38 deletions

View File

@ -1,42 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <!-- This Source Code Form is subject to the terms of the Mozilla Public
xmlns:android="http://schemas.android.com/apk/res/android" - License, v. 2.0. If a copy of the MPL was not distributed with this
xmlns:app="http://schemas.android.com/apk/res-auto" - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
android:id="@+id/tabs_header" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/tabs_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/header_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:text="@string/tabs_header_title"
android:layout_marginStart="16dp" android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_marginEnd="16dp" android:textColor="?attr/toolbarTextColor"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent"
<TextView app:layout_constraintTop_toTopOf="parent" />
android:id="@+id/header_text"
android:layout_width="match_parent" <ImageButton
android:layout_height="wrap_content" android:id="@+id/add_tab_button"
android:text="@string/tabs_header_title" android:layout_width="@dimen/glyph_button_width"
android:textSize="24sp" android:layout_height="@dimen/glyph_button_height"
android:textColor="?attr/toolbarTextColor" android:background="?android:attr/selectableItemBackground"
app:layout_constraintTop_toTopOf="parent" android:src="@drawable/ic_new"
app:layout_constraintStart_toStartOf="parent"/> android:tint="?attr/toolbarTextColor"
<ImageView app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/add_tab_button" app:layout_constraintEnd_toStartOf="@id/tabs_overflow_button"
android:layout_width="wrap_content" app:layout_constraintTop_toTopOf="parent" />
android:layout_height="wrap_content"
android:layout_margin="8dp" <ImageButton
android:src="@drawable/ic_new" android:id="@+id/tabs_overflow_button"
android:tint="?attr/toolbarTextColor" android:layout_width="@dimen/glyph_button_width"
android:baselineAlignBottom="true" android:layout_height="@dimen/glyph_button_height"
app:layout_constraintBaseline_toBaselineOf="@id/header_text" android:background="?android:attr/selectableItemBackground"
app:layout_constraintEnd_toStartOf="@id/tabs_overflow_button"/> android:src="@drawable/ic_menu"
<ImageView android:tint="?attr/toolbarTextColor"
android:id="@+id/tabs_overflow_button" app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="wrap_content" app:layout_constraintEnd_toEndOf="parent"
android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" />
android:layout_margin="8dp"
android:tint="?attr/toolbarTextColor"
android:src="@drawable/ic_menu"
android:baselineAlignBottom="true"
app:layout_constraintBaseline_toBaselineOf="@id/header_text"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>