library_site_item.xml (4456B)
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 6 xmlns:android="http://schemas.android.com/apk/res/android" 7 xmlns:app="http://schemas.android.com/apk/res-auto" 8 xmlns:tools="http://schemas.android.com/tools" 9 android:layout_width="match_parent" 10 android:layout_height="wrap_content" 11 android:minHeight="@dimen/library_item_height" 12 android:background="?android:attr/selectableItemBackground"> 13 14 <ImageSwitcher 15 android:id="@+id/icon" 16 android:layout_width="@dimen/history_favicon_width_height" 17 android:layout_height="@dimen/history_favicon_width_height" 18 android:layout_marginStart="8dp" 19 app:layout_constraintStart_toStartOf="parent" 20 app:layout_constraintTop_toTopOf="parent" 21 app:layout_constraintBottom_toBottomOf="parent"> 22 <com.google.android.material.imageview.ShapeableImageView 23 android:id="@+id/favicon" 24 android:layout_width="match_parent" 25 android:layout_height="match_parent" 26 android:padding="8dp" 27 android:scaleType="centerCrop" 28 android:importantForAccessibility="no" 29 tools:src="@drawable/ic_folder_icon" /> 30 <ImageView 31 android:id="@+id/checkmark" 32 android:layout_width="40dp" 33 android:layout_height="40dp" 34 android:layout_marginStart="4dp" 35 android:layout_marginTop="4dp" 36 android:padding="10dp" 37 android:background="@drawable/favicon_background" 38 android:backgroundTint="?accent" 39 app:srcCompat="@drawable/mozac_ic_checkmark_24" 40 app:tint="?iconOnColor" /> 41 </ImageSwitcher> 42 43 <TextView 44 android:id="@+id/title" 45 android:layout_width="0dp" 46 android:layout_height="wrap_content" 47 android:layout_marginStart="24dp" 48 android:layout_marginEnd="4dp" 49 android:ellipsize="end" 50 android:singleLine="true" 51 android:textAlignment="viewStart" 52 android:textSize="16sp" 53 android:textColor="?attr/textPrimary" 54 tools:text="Example site" 55 app:layout_constraintEnd_toStartOf="@id/overflow_menu" 56 app:layout_constraintStart_toEndOf="@id/icon" 57 app:layout_constraintTop_toTopOf="parent" 58 app:layout_constraintBottom_toTopOf="@+id/url" 59 app:layout_constraintVertical_chainStyle="packed" 60 app:layout_goneMarginEnd="@dimen/library_item_icon_margin_horizontal" /> 61 62 <TextView 63 android:id="@+id/url" 64 android:layout_width="0dp" 65 android:layout_height="wrap_content" 66 android:layout_marginStart="24dp" 67 android:layout_marginEnd="4dp" 68 android:ellipsize="end" 69 android:singleLine="true" 70 android:textAlignment="viewStart" 71 android:textColor="?attr/textSecondary" 72 android:textSize="14sp" 73 tools:text="https://example.com/" 74 app:layout_constraintEnd_toStartOf="@id/overflow_menu" 75 app:layout_constraintStart_toEndOf="@id/icon" 76 app:layout_constraintTop_toBottomOf="@+id/title" 77 app:layout_constraintBottom_toBottomOf="parent" 78 app:layout_goneMarginEnd="@dimen/library_item_icon_margin_horizontal" /> 79 80 <ImageButton 81 android:id="@+id/overflow_menu" 82 android:layout_width="wrap_content" 83 android:layout_height="wrap_content" 84 android:minWidth="48dp" 85 android:minHeight="48dp" 86 android:background="?android:attr/selectableItemBackgroundBorderless" 87 android:contentDescription="@string/content_description_menu" 88 android:padding="12dp" 89 app:srcCompat="@drawable/ic_menu" 90 app:layout_constraintBottom_toBottomOf="parent" 91 app:layout_constraintEnd_toEndOf="parent" 92 app:layout_constraintTop_toTopOf="parent" 93 android:layout_marginEnd="4dp"/> 94 95 </androidx.constraintlayout.widget.ConstraintLayout>