activity_sticker_pack_details.xml 5.97 KB
Newer Older
1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="match_parent"
    android:layout_marginTop="8dp"
ar-arvind's avatar
ar-arvind committed
8
    android:layout_marginBottom="@dimen/preview_side_margin"
9
10
    android:orientation="vertical">

ar-arvind's avatar
ar-arvind committed
11
    <androidx.constraintlayout.widget.ConstraintLayout
12
13
14
        android:id="@+id/constraintLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
ar-arvind's avatar
ar-arvind committed
15
        android:layout_marginStart="@dimen/preview_side_margin"
16
        android:layout_marginLeft="@dimen/preview_side_margin"
ar-arvind's avatar
ar-arvind committed
17
        android:layout_marginEnd="@dimen/preview_side_margin"
18
        android:layout_marginRight="@dimen/preview_side_margin"
ar-arvind's avatar
ar-arvind committed
19
        android:layout_marginBottom="24dp">
20
21
22
23
24
25


        <ImageView
            android:id="@+id/tray_image"
            android:layout_width="36dp"
            android:layout_height="36dp"
ar-arvind's avatar
ar-arvind committed
26
27
28
            android:layout_marginStart="16dp"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="8dp"
29
30
31
32
            android:contentDescription="@string/tray_image_content_description"
            android:src="@color/colorAccent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
ar-arvind's avatar
ar-arvind committed
33
            tools:src="@color/colorAccent" />
34
35
36
37
38
39

        <TextView
            android:id="@+id/pack_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_from_tray_to_name"
ar-arvind's avatar
ar-arvind committed
40
            android:layout_marginLeft="@dimen/margin_from_tray_to_name"
41
42
43
44
45
46
47
48
49
50
51
52
            android:layout_marginTop="8dp"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintStart_toEndOf="@+id/tray_image"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Pack Name" />

        <TextView
            android:id="@+id/author"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_from_tray_to_name"
ar-arvind's avatar
ar-arvind committed
53
            android:layout_marginLeft="@dimen/margin_from_tray_to_name"
54
55
56
57
58
59
60
61
62
63
            android:layout_marginTop="16dp"
            app:layout_constraintStart_toEndOf="@+id/tray_image"
            app:layout_constraintTop_toBottomOf="@+id/pack_name"
            tools:text="Author" />

        <TextView
            android:id="@+id/pack_size"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_from_tray_to_name"
ar-arvind's avatar
ar-arvind committed
64
            android:layout_marginLeft="@dimen/margin_from_tray_to_name"
65
66
67
68
            app:layout_constraintStart_toEndOf="@+id/tray_image"
            app:layout_constraintTop_toBottomOf="@+id/author"
            tools:text="Size" />

ar-arvind's avatar
ar-arvind committed
69
    </androidx.constraintlayout.widget.ConstraintLayout>
70
71
72
73
74
75
76
77
78
79
80
81

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <com.example.samplestickerapp.BottomFadingRecyclerView
            android:id="@+id/sticker_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            android:fadingEdgeLength="@dimen/fading_edge_length"
ar-arvind's avatar
ar-arvind committed
82
            android:paddingStart="@dimen/preview_side_margin"
83
            android:paddingLeft="@dimen/preview_side_margin"
ar-arvind's avatar
ar-arvind committed
84
            android:paddingEnd="@dimen/preview_side_margin"
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
            android:paddingRight="@dimen/preview_side_margin"
            android:requiresFadingEdge="vertical" />

        <View
            android:id="@+id/divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:alpha="0.1"
            android:background="#000000"
            android:visibility="invisible"
            tools:visibility="visible" />

    </FrameLayout>

    <FrameLayout
        android:layout_width="match_parent"
ar-arvind's avatar
ar-arvind committed
101
        android:layout_height="60dp"
102
        android:layout_marginStart="@dimen/preview_side_margin"
ar-arvind's avatar
ar-arvind committed
103
104
105
        android:layout_marginLeft="@dimen/preview_side_margin"
        android:layout_marginEnd="@dimen/preview_side_margin"
        android:layout_marginRight="@dimen/preview_side_margin">
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

        <TextView
            android:id="@+id/already_added_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="@string/details_pack_already_added"
            android:textColor="#9B9B9B"
            android:textSize="14sp"
            android:visibility="gone"
            tools:visibility="visible" />

        <FrameLayout
            android:id="@+id/add_to_whatsapp_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="@drawable/btn_green"
            android:clickable="true"
ar-arvind's avatar
ar-arvind committed
126
127
            android:focusable="true"
            android:foreground="?attr/selectableItemBackgroundBorderless">
128
129
130
131
132
133
134
135

            <TextView
                style="@style/StickerPreviewButtonText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:background="@android:color/transparent"
                android:clickable="false"
ar-arvind's avatar
ar-arvind committed
136
                android:drawableStart="@drawable/sticker_3rdparty_wa"
137
138
139
140
141
142
143
144
                android:drawableLeft="@drawable/sticker_3rdparty_wa"
                android:drawablePadding="8dp"
                android:focusable="false"
                android:foreground="@android:color/transparent"
                android:text="@string/add_to_whatsapp" />
        </FrameLayout>
    </FrameLayout>
</LinearLayout>