widgets: update control layout

Rework the widget control layouts to add additional controls and to
have more consistent padding.
This commit is contained in:
OxygenCobalt 2022-06-29 11:35:49 -06:00
parent 249ddae269
commit a81b90a81f
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
3 changed files with 28 additions and 3 deletions

View file

@ -46,12 +46,15 @@
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="@dimen/spacing_medium">
android:paddingTop="@dimen/spacing_medium"
android:paddingBottom="@dimen/spacing_medium">
<android.widget.TextView
android:id="@+id/widget_song"
style="@style/Widget.Auxio.TextView.Primary.AppWidget"
android:layout_width="match_parent"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_height="wrap_content"
android:text="@string/def_widget_song" />
@ -60,12 +63,16 @@
style="@style/Widget.Auxio.TextView.Secondary.AppWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@string/def_widget_artist" />
<android.widget.LinearLayout
android:id="@+id/widget_controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_small"
android:layout_marginEnd="@dimen/spacing_small"
android:layout_marginTop="@dimen/spacing_small">
<android.widget.ImageButton

View file

@ -46,13 +46,16 @@
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="@dimen/spacing_medium">
android:paddingTop="@dimen/spacing_medium"
android:paddingBottom="@dimen/spacing_medium">
<android.widget.TextView
android:id="@+id/widget_song"
style="@style/Widget.Auxio.TextView.Primary.AppWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@string/def_widget_song" />
<android.widget.TextView
@ -60,6 +63,8 @@
style="@style/Widget.Auxio.TextView.Secondary.AppWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@string/def_widget_artist" />
<android.widget.LinearLayout
@ -67,6 +72,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:layout_marginStart="@dimen/spacing_small"
android:layout_marginEnd="@dimen/spacing_small"
android:orientation="horizontal">
<android.widget.ImageButton

View file

@ -69,7 +69,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_small"
android:layout_weight="1"
android:orientation="vertical">
@ -97,8 +97,19 @@
android:contentDescription="@string/desc_play_pause"
android:minWidth="@dimen/size_btn"
android:minHeight="@dimen/size_btn"
android:layout_marginEnd="@dimen/spacing_small"
android:src="@drawable/ic_play" />
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc_play_pause"
android:minWidth="@dimen/size_btn"
android:minHeight="@dimen/size_btn"
android:src="@drawable/ic_skip_next" />
</android.widget.LinearLayout>
</LinearLayout>