Revision control
Copy as Markdown
<?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
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/title"
style="@style/SwitchTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="44dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="64dp"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no"
app:layout_constraintBottom_toTopOf="@id/description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Title" />
<TextView
android:id="@+id/description"
style="@style/SwitchDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/title"
app:layout_constraintStart_toStartOf="@id/title"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Description" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switch_widget"
android:theme="@style/SwitchTheme"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="@id/description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>