menu_item.xml (1744B)
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 android:layout_width="match_parent" 8 android:layout_height="wrap_content" 9 android:background="?android:attr/selectableItemBackground" 10 android:clickable="true" 11 android:focusable="true"> 12 13 <androidx.appcompat.widget.AppCompatImageView 14 android:id="@+id/icon" 15 android:layout_width="wrap_content" 16 android:layout_height="wrap_content" 17 android:layout_marginStart="24dp" 18 android:scaleType="centerInside" 19 app:layout_constraintBottom_toBottomOf="parent" 20 app:layout_constraintEnd_toStartOf="@id/title" 21 app:layout_constraintStart_toStartOf="parent" 22 app:layout_constraintTop_toTopOf="parent" /> 23 24 <TextView 25 android:id="@+id/title" 26 style="@android:style/TextAppearance.Material.Menu" 27 android:layout_width="0dp" 28 android:layout_height="48dp" 29 android:ellipsize="end" 30 android:gravity="center_vertical" 31 android:lines="1" 32 android:paddingStart="16dp" 33 android:paddingEnd="16dp" 34 android:textSize="16sp" 35 app:layout_constraintBottom_toBottomOf="@id/icon" 36 app:layout_constraintEnd_toEndOf="parent" 37 app:layout_constraintStart_toEndOf="@id/icon" 38 app:layout_constraintTop_toTopOf="@id/icon" /> 39 40 </androidx.constraintlayout.widget.ConstraintLayout>