item_form_switch.xml 2.58 KB
Newer Older
1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
    android:background="?riotx_background"
Benoît Marty's avatar
Benoît Marty committed
8
    android:foreground="?attr/selectableItemBackground"
9
10
    android:minHeight="@dimen/item_form_min_height">

11
    <TextView
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
        android:id="@+id/formSwitchTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:layout_marginEnd="@dimen/layout_horizontal_margin"
        android:duplicateParentState="true"
        android:textColor="?riotx_text_primary"
        android:textSize="15sp"
        app:layout_constraintBottom_toTopOf="@+id/formSwitchSummary"
        app:layout_constraintEnd_toStartOf="@+id/formSwitchSwitch"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="@string/create_room_public_title" />

    <TextView
        android:id="@+id/formSwitchSummary"
29
        android:layout_width="0dp"
30
31
32
33
34
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:textColor="?riotx_text_secondary"
        android:textSize="14sp"
        app:layout_constraintBottom_toTopOf="@+id/formSwitchDivider"
35
        app:layout_constraintEnd_toStartOf="@+id/formSwitchSwitch"
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
        app:layout_constraintStart_toStartOf="@+id/formSwitchTitle"
        app:layout_constraintTop_toBottomOf="@+id/formSwitchTitle"
        tools:text="@string/create_room_public_description" />

    <com.google.android.material.switchmaterial.SwitchMaterial
        android:id="@+id/formSwitchSwitch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="19dp"
        app:layout_constraintBottom_toTopOf="@+id/formSwitchDivider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <View
        android:id="@+id/formSwitchDivider"
        android:layout_width="0dp"
        android:layout_height="1dp"
Valere's avatar
Valere committed
53
        android:background="?vctr_list_divider_color"
54
55
56
57
58
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>