mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
* Added drawables ic_overflow_black and ic_overflow_white * Added overflow_menu_button attribute to switch between white and black drawables depending on if theme is light or dark * Set Overflow Menu Icon srcCompat to overflow_menu_button attribute
75 lines
No EOL
2.9 KiB
XML
75 lines
No EOL
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<merge xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/toolbar_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
android:background="?attr/mainBackground"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<ImageButton
|
|
android:id="@+id/back"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_centerVertical="true"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:clickable="true"
|
|
android:contentDescription="@string/back"
|
|
android:focusable="true"
|
|
android:padding="@dimen/standard_gap"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:srcCompat="?attr/custom_selector_back" />
|
|
|
|
<TextView
|
|
android:id="@+id/title"
|
|
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="29dp"
|
|
android:ellipsize="end"
|
|
android:singleLine="true"
|
|
android:text="@string/custom_selector_title"
|
|
android:textAlignment="center"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@+id/image_limit_error"
|
|
app:layout_constraintStart_toEndOf="@+id/back"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<!-- Warning Icon (image_limit_error) -->
|
|
<ImageButton
|
|
android:id="@+id/image_limit_error"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:background="#00FFFFFF"
|
|
android:padding="@dimen/standard_gap"
|
|
android:contentDescription="@string/custom_selector_limit_error_desc"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@id/menu_overflow"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_bias="1.0"
|
|
app:layout_constraintStart_toEndOf="@id/title"
|
|
app:srcCompat="@drawable/ic_error_red_24dp" />
|
|
|
|
<!-- Overflow Menu Icon (menu_overflow) -->
|
|
<ImageButton
|
|
android:id="@+id/menu_overflow"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:background="#00FFFFFF"
|
|
android:padding="@dimen/standard_gap"
|
|
android:contentDescription="@string/menu_overflow_desc"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_bias="1.0"
|
|
app:layout_constraintStart_toEndOf="@id/image_limit_error"
|
|
app:srcCompat="?attr/overflow_menu_button"/>
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</merge> |