2019-02-08 19:35:48 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-02-28 17:36:45 +01:00
|
|
|
<!-- 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/. -->
|
2019-04-07 03:56:18 +02:00
|
|
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
2019-02-08 19:35:48 +01:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
2019-04-07 03:56:18 +02:00
|
|
|
android:id="@+id/item_tab"
|
2019-02-08 19:35:48 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginBottom="8dp"
|
2019-04-07 03:56:18 +02:00
|
|
|
android:clickable="true"
|
2019-02-28 17:36:45 +01:00
|
|
|
android:clipToPadding="false"
|
2019-04-07 03:56:18 +02:00
|
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
2019-04-18 18:26:03 +02:00
|
|
|
app:cardBackgroundColor="?above"
|
2019-03-01 08:46:55 +01:00
|
|
|
app:cardCornerRadius="@dimen/tab_corner_radius"
|
|
|
|
app:cardElevation="5dp">
|
2019-02-08 19:35:48 +01:00
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2019-02-28 17:36:45 +01:00
|
|
|
android:layout_width="match_parent"
|
2019-04-06 06:24:28 +02:00
|
|
|
android:layout_height="wrap_content">
|
2019-02-08 19:35:48 +01:00
|
|
|
|
2019-02-28 17:36:45 +01:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/favicon_image"
|
2019-04-19 22:41:13 +02:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="0dp"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:layout_margin="8dp"
|
|
|
|
android:adjustViewBounds="true"
|
2019-04-07 03:56:18 +02:00
|
|
|
android:importantForAccessibility="no"
|
2019-04-19 22:41:13 +02:00
|
|
|
android:scaleType="fitCenter"
|
|
|
|
app:layout_constraintDimensionRatio="1:1"
|
2019-04-19 22:24:59 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2019-02-28 17:36:45 +01:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-02-08 19:35:48 +01:00
|
|
|
|
2019-02-28 17:36:45 +01:00
|
|
|
<TextView
|
2019-04-19 22:24:59 +02:00
|
|
|
android:id="@+id/hostname"
|
2019-02-28 17:36:45 +01:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:layout_marginStart="8dp"
|
2019-03-21 01:26:13 +01:00
|
|
|
android:ellipsize="none"
|
|
|
|
android:singleLine="true"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:textColor="?secondaryText"
|
|
|
|
android:textSize="12sp"
|
|
|
|
android:textStyle="bold"
|
2019-02-28 17:36:45 +01:00
|
|
|
app:layout_constraintEnd_toStartOf="@id/close_tab_button"
|
|
|
|
app:layout_constraintStart_toEndOf="@id/favicon_image"
|
2019-03-01 08:46:55 +01:00
|
|
|
app:layout_constraintTop_toTopOf="@id/favicon_image" />
|
2019-02-08 19:35:48 +01:00
|
|
|
|
2019-04-19 22:24:59 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/tab_title"
|
|
|
|
android:layout_width="0dp"
|
2019-04-19 22:41:13 +02:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:layout_marginTop="4dp"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="2"
|
2019-04-19 22:41:13 +02:00
|
|
|
android:minLines="2"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:textColor="?primaryText"
|
|
|
|
android:textSize="15sp"
|
|
|
|
app:layout_constraintStart_toEndOf="@id/favicon_image"
|
|
|
|
app:layout_constraintEnd_toEndOf="@id/hostname"
|
|
|
|
app:layout_constraintTop_toBottomOf="@id/hostname"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
|
2019-02-28 17:36:45 +01:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/close_tab_button"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:layout_margin="8dp"
|
2019-02-28 17:36:45 +01:00
|
|
|
android:contentDescription="@string/close_tab"
|
|
|
|
android:src="@drawable/ic_close"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
2019-03-21 01:26:13 +01:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-04-19 22:24:59 +02:00
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-02-08 19:35:48 +01:00
|
|
|
|
2019-04-19 22:24:59 +02:00
|
|
|
<ImageButton
|
|
|
|
android:id="@+id/tab_overflow_button"
|
2019-04-22 23:50:22 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-04-19 22:24:59 +02:00
|
|
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
|
|
android:contentDescription="@string/tab_menu"
|
|
|
|
android:src="@drawable/ic_menu"
|
2019-04-22 23:50:22 +02:00
|
|
|
android:layout_margin="8dp"
|
2019-02-28 17:36:45 +01:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-04-22 23:50:22 +02:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/close_tab_button"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
2019-02-08 19:35:48 +01:00
|
|
|
|
2019-03-01 08:46:55 +01:00
|
|
|
<View
|
|
|
|
android:id="@+id/selected_border"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="0dp"
|
|
|
|
android:background="@drawable/session_border"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2019-03-21 01:26:13 +01:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-03-01 08:46:55 +01:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2019-03-21 01:26:13 +01:00
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-02-08 19:35:48 +01:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-04-07 03:56:18 +02:00
|
|
|
</androidx.cardview.widget.CardView>
|