summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/feeditemlist_item.xml
blob: 37b88d1b59210f39bdf82bfec514a6803037b017 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    <!--
    This parent FrameLayout is necessary because RecyclerView's ItemAnimator changes alpha values,
    which conflicts with our played state indicator.
    -->

    <LinearLayout
            android:id="@+id/container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:baselineAligned="false"
            android:paddingStart="12dp"
            android:paddingLeft="12dp"
            android:paddingEnd="0dp"
            android:paddingRight="0dp"
            tools:ignore="UselessParent">

        <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:id="@+id/left_padding"
                android:minWidth="4dp">
            <ImageView
                    android:id="@+id/drag_handle"
                    android:layout_width="16dp"
                    android:layout_height="match_parent"
                    android:importantForAccessibility="no"
                    android:scaleType="fitCenter"
                    app:srcCompat="?attr/dragview_background"
                    android:paddingStart="0dp"
                    android:paddingLeft="0dp"
                    android:paddingEnd="4dp"
                    android:paddingRight="4dp"
                    tools:src="@drawable/ic_drag_darktheme"
                    tools:background="@android:color/holo_green_dark"/>

        </LinearLayout>

        <androidx.cardview.widget.CardView
                android:layout_width="@dimen/thumbnail_length_queue_item"
                android:layout_height="@dimen/thumbnail_length_queue_item"
                android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
                android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
                android:layout_marginRight="@dimen/listitem_threeline_textleftpadding"
                android:layout_marginEnd="@dimen/listitem_threeline_textleftpadding"
                android:id="@+id/coverHolder"
                app:cardBackgroundColor="@color/non_square_icon_background"
                app:cardCornerRadius="4dp"
                app:cardPreventCornerOverlap="false"
                app:cardElevation="0dp">

            <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                <TextView
                        android:id="@+id/txtvPlaceholder"
                        android:layout_width="@dimen/thumbnail_length_queue_item"
                        android:layout_height="@dimen/thumbnail_length_queue_item"
                        android:layout_centerVertical="true"
                        android:gravity="center"
                        android:background="@color/light_gray"
                        android:maxLines="3"
                        android:padding="2dp"
                        android:ellipsize="end"/>
                <ImageView
                        android:id="@+id/imgvCover"
                        android:layout_width="@dimen/thumbnail_length_queue_item"
                        android:layout_height="@dimen/thumbnail_length_queue_item"
                        android:layout_centerVertical="true"
                        android:importantForAccessibility="no"
                        tools:src="@tools:sample/avatars"/>

            </RelativeLayout>
        </androidx.cardview.widget.CardView>

        <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
                android:layout_marginRight="@dimen/listitem_threeline_textrightpadding"
                android:layout_marginEnd="@dimen/listitem_threeline_textrightpadding"
                android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
                android:layout_weight="1"
                tools:background="@android:color/holo_red_dark"
                android:orientation="vertical">

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/status"
                    android:orientation="horizontal"
                    android:gravity="center_vertical">

                <TextView
                        android:text="@string/new_label"
                        style="@style/AntennaPod.TextView.UnreadIndicator"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/statusUnread"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        tools:text="@sample/episodes.json/data/status_label"/>

                <ImageView
                        android:layout_width="14sp"
                        android:layout_height="14sp"
                        app:srcCompat="@drawable/ic_videocam"
                        android:contentDescription="@string/media_type_video_label"
                        android:id="@+id/ivIsVideo"/>

                <ImageView
                        android:layout_width="14sp"
                        android:layout_height="14sp"
                        app:srcCompat="@drawable/ic_star"
                        android:contentDescription="@string/is_favorite_label"
                        android:id="@+id/isFavorite"/>

                <ImageView
                        android:layout_width="14sp"
                        android:layout_height="14sp"
                        app:srcCompat="@drawable/ic_playlist"
                        android:contentDescription="@string/in_queue_label"
                        android:id="@+id/ivInPlaylist"/>

                <TextView
                        android:id="@+id/separatorIcons"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="4dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        android:text="·"
                        android:importantForAccessibility="no"
                        tools:background="@android:color/holo_blue_light"/>

                <TextView
                        android:id="@+id/txtvPubDate"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        tools:text="@sample/episodes.json/data/published_at"/>

                <TextView
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        android:text="·"
                        android:importantForAccessibility="no"
                        tools:background="@android:color/holo_blue_light"/>

                <TextView
                        android:id="@+id/size"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        tools:text="10 MB"/>

            </LinearLayout>

            <!--
                Warning: android:contentDescription is set to an empty string.
                The title is read as contentDescription of left_padding to have it read first.
                Keep this in mind when changing the order of this layout!
            -->
            <TextView
                    android:id="@+id/txtvTitle"
                    style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    tools:text="@sample/episodes.json/data/title"
                    android:importantForAccessibility="no"
                    android:ellipsize="end"
                    tools:background="@android:color/holo_blue_light"/>

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/progress"
                    android:orientation="horizontal"
                    android:gravity="center_vertical">

                <TextView
                        android:id="@+id/txtvPosition"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="0dp"
                        tools:text="00:42:23"
                        tools:background="@android:color/holo_blue_light"/>

                <ProgressBar
                        android:id="@+id/progressBar"
                        style="?attr/progressBarTheme"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:layout_height="4dp"
                        android:max="100"
                        android:layout_margin="4dp"
                        tools:background="@android:color/holo_blue_light"/>

                <TextView
                        android:id="@+id/txtvDuration"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="0dp"
                        tools:text="@sample/episodes.json/data/duration"
                        tools:background="@android:color/holo_blue_light"/>

            </LinearLayout>

        </LinearLayout>

        <include layout="@layout/secondary_action"/>

    </LinearLayout>
</FrameLayout>