summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/home_section.xml
blob: ea9c2ff3e5ca35cff56f05864a255cc31aa6c791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?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:layout_centerInParent="true"
    android:gravity="center"
    android:orientation="vertical"
    android:paddingBottom="4dp">

    <TextView
        android:id="@+id/titleLabel"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:textAlignment="textStart"
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="18sp"
        android:layout_marginVertical="8dp"
        app:layout_constraintWidth_max="wrap"
        app:layout_constraintWidth_percent="0.6"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintWidth_default="wrap"
        app:layout_constraintEnd_toStartOf="@id/shuffleButton"
        tools:text="Title" />

    <ImageButton
        android:id="@+id/shuffleButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginVertical="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toEndOf="@id/titleLabel"
        app:layout_constraintEnd_toStartOf="@id/numNewItemsLabel"
        tools:visibility="visible"
        app:srcCompat="@drawable/ic_shuffle" />

    <TextView
        android:id="@+id/numNewItemsLabel"
        android:layout_width="wrap_content"
        android:layout_height="20dp"
        android:layout_marginVertical="12dp"
        android:layout_marginStart="8dp"
        android:background="@drawable/bg_pill"
        android:paddingHorizontal="8dp"
        android:textAlignment="center"
        android:textColor="?attr/colorPrimary"
        android:textSize="16sp"
        android:visibility="gone"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintStart_toEndOf="@id/shuffleButton"
        app:layout_constraintEnd_toStartOf="@id/moreButton"
        tools:visibility="visible"
        tools:text="6" />

    <Button
        android:id="@+id/moreButton"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:minWidth="0dp"
        android:paddingVertical="0dp"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:textAlignment="textEnd"
        app:layout_constraintWidth_max="wrap"
        app:layout_constraintWidth_percent="0.4"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        tools:text="@string/discover_more"
        style="@style/Widget.MaterialComponents.Button.TextButton" />

    <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="titleLabel,moreButton" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/moreButton"
        android:clipToPadding="false"
        android:clipToOutline="false"
        android:clipChildren="false"
        android:paddingHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/barrier"
        tools:listitem="@layout/horizontal_itemlist_item"
        tools:itemCount="1" />

</androidx.constraintlayout.widget.ConstraintLayout>