Skip to content

Commit e6c56ca

Browse files
phigjmStypox
authored andcommitted
Rearrange the play queue control elements
from bottom to top: Playback_controls, progress bar, center, (seek display)
1 parent a4742ad commit e6c56ca

1 file changed

Lines changed: 36 additions & 23 deletions

File tree

app/src/main/res/layout/activity_player_queue_control.xml

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,44 @@
3131
android:id="@+id/play_queue"
3232
android:layout_width="match_parent"
3333
android:layout_height="match_parent"
34-
android:layout_above="@id/center"
34+
android:layout_above="@id/progress_bar"
3535
android:layout_below="@id/appbar"
3636
android:scrollbars="vertical"
3737
app:layoutManager="LinearLayoutManager"
3838
tools:listitem="@layout/play_queue_item" />
3939

40+
41+
42+
<RelativeLayout
43+
android:id="@+id/seek_bar_layout"
44+
android:layout_width="match_parent"
45+
android:layout_height="wrap_content"
46+
android:layout_above="@id/center">
47+
<TextView
48+
android:id="@+id/seek_display"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:layout_centerInParent="true"
52+
android:background="#c0000000"
53+
android:paddingLeft="30dp"
54+
android:paddingTop="5dp"
55+
android:paddingRight="30dp"
56+
android:paddingBottom="5dp"
57+
android:textColor="@android:color/white"
58+
android:textSize="22sp"
59+
android:textStyle="bold"
60+
android:visibility="gone"
61+
tools:ignore="RtlHardcoded"
62+
tools:text="1:06:29"
63+
tools:visibility="visible" />
64+
</RelativeLayout>
65+
4066
<RelativeLayout
4167
android:id="@+id/center"
4268
android:layout_width="match_parent"
4369
android:layout_height="wrap_content"
44-
android:layout_above="@+id/playback_controls">
70+
android:layout_above="@id/progress_bar"
71+
android:gravity="center">
4572

4673
<LinearLayout
4774
android:id="@+id/metadata"
@@ -81,34 +108,16 @@
81108
tools:text="Duis posuere arcu condimentum lobortis mattis." />
82109
</LinearLayout>
83110

84-
<TextView
85-
android:id="@+id/seek_display"
86-
android:layout_width="wrap_content"
87-
android:layout_height="wrap_content"
88-
android:layout_centerInParent="true"
89-
android:background="#c0000000"
90-
android:paddingLeft="30dp"
91-
android:paddingTop="5dp"
92-
android:paddingRight="30dp"
93-
android:paddingBottom="5dp"
94-
android:textColor="@android:color/white"
95-
android:textSize="22sp"
96-
android:textStyle="bold"
97-
android:visibility="gone"
98-
tools:ignore="RtlHardcoded"
99-
tools:text="1:06:29"
100-
tools:visibility="visible" />
101111
</RelativeLayout>
102112

103113
<LinearLayout
104114
android:id="@+id/progress_bar"
105115
android:layout_width="match_parent"
106116
android:layout_height="wrap_content"
107-
android:layout_alignParentBottom="true"
108-
android:gravity="center"
109117
android:orientation="horizontal"
110118
android:paddingLeft="12dp"
111-
android:paddingRight="12dp">
119+
android:paddingRight="12dp"
120+
android:layout_above="@+id/playback_controls">
112121

113122
<TextView
114123
android:id="@+id/current_time"
@@ -159,12 +168,14 @@
159168
android:visibility="gone" />
160169
</LinearLayout>
161170

171+
162172
<RelativeLayout
163173
android:id="@+id/playback_controls"
164174
android:layout_width="match_parent"
165175
android:layout_height="wrap_content"
166-
android:layout_above="@+id/progress_bar"
167176
android:orientation="horizontal"
177+
android:layout_alignParentBottom="true"
178+
android:layout_marginBottom="12dp"
168179
tools:ignore="RtlHardcoded">
169180

170181
<ImageButton
@@ -295,4 +306,6 @@
295306

296307
</RelativeLayout>
297308

309+
310+
298311
</RelativeLayout>

0 commit comments

Comments
 (0)