Revision control
Copy as Markdown
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="16sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:textColor="@color/black_87_percent"
android:letterSpacing="0.01"
android:lineSpacingExtra="8sp"
android:layout_marginStart="16dp"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Send Usage Data"/>
<Switch
android:id="@+id/toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="18dp"
android:thumbTint="@color/switch_thumb_color"
app:layout_constraintTop_toTopOf="@id/title"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="title, toggle"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:letterSpacing="0.02"
android:lineSpacingExtra="6sp"
android:textColor="@color/black_60_percent"
android:textSize="14sp"
android:textStyle="normal"
android:layout_marginStart="16dp"
android:paddingTop="2dp"
app:layout_constraintTop_toBottomOf="@id/barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintWidth_max="300dp"
tools:text="@string/send_usage_data_summary" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:fontFamily="sans-serif"
android:minWidth="0dp"
android:minHeight="0dp"
android:layout_marginTop="4dp"
android:paddingTop="4dp"
android:textStyle="bold"
android:textColor="@color/link_pressed"
android:letterSpacing="0.03"
android:lineSpacingExtra="7.5sp"
android:background="@null"
app:layout_constraintTop_toBottomOf="@id/subtitle"
app:layout_constraintStart_toStartOf="@id/title"
tools:text="@string/learn_more"/>
</androidx.constraintlayout.widget.ConstraintLayout>