1
0
Fork 0
fenix/app/src/main/res/layout/list_element.xml

75 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<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/list_item"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?above"
android:clickable="true"
android:clipToPadding="false"
android:elevation="5dp"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground">
<ImageView
android:id="@+id/list_item_favicon"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/rounded_grey_corners_transparent_center"
android:padding="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_tab_collection"
android:tint="@null"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="parent"/>
<TextView
android:id="@+id/list_element_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="9dp"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/Body14TextStyle"
app:layout_constraintEnd_toStartOf="@id/list_item_action_button"
app:layout_constraintStart_toEndOf="@id/list_item_favicon"
app:layout_constraintBottom_toTopOf="@id/list_item_url"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/list_item_url"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:textColor="?secondaryText"
android:textSize="10sp"
android:ellipsize="end"
android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/list_element_title"
app:layout_constraintStart_toStartOf="@id/list_element_title"
app:layout_constraintTop_toBottomOf="@id/list_element_title" />
<ImageButton
android:id="@+id/list_item_action_button"
android:layout_width="48dp"
android:layout_height="48dp"
android:alpha="0.8"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/remove_tab_from_collection"
app:srcCompat="@drawable/ic_close"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>