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

54 lines
2.4 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/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="0dp"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<TextView
android:id="@+id/switchItemTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginEnd="64dp"
android:clickable="false"
android:textAppearance="@style/ListItemTextStyle"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/switchItemDescription"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="@tools:sample/lorem" />
<TextView
android:id="@+id/switchItemDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:clickable="false"
android:textColor="?attr/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/switchItemTitle"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@id/switchItemTitle"
app:layout_constraintTop_toBottomOf="@+id/switchItemTitle"
app:layout_constraintVertical_chainStyle="packed"
tools:text="@tools:sample/lorem" />
<Switch
android:id="@+id/switch_widget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
android:drawableStart="@drawable/ic_tracking_protection"
app:layout_constraintBottom_toBottomOf="@id/switchItemDescription"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/switchItemTitle" />
</merge>