widgets: add 1x3/1x4 widget

Add a 1x3/1x4 widget that displays the cover and controls

Also requires another widget type that just displays controls to
accomodate landscape devices.

Resolves #420.
This commit is contained in:
Alexander Capehart
2024-01-15 20:49:35 -07:00
parent 195498879a
commit 881df0fc02
19 changed files with 451 additions and 151 deletions
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:theme="@style/Theme.Auxio.Widget">
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/ui_widget_rectangle_button_bg">
<android.widget.ImageButton
android:id="@+id/widget_repeat"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/desc_change_repeat"
android:src="@drawable/ic_repeat_off_24" />
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/ui_widget_rectangle_button_bg">
<android.widget.ImageButton
android:id="@+id/widget_skip_prev"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/desc_skip_prev"
android:src="@drawable/ic_skip_prev_24" />
</FrameLayout>
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:contentDescription="@string/desc_play_pause"
android:src="@drawable/ic_play_24" />
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/ui_widget_rectangle_button_bg">
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/desc_skip_next"
android:src="@drawable/ic_skip_next_24" />
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/ui_widget_rectangle_button_bg">
<android.widget.ImageButton
android:id="@+id/widget_shuffle"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/desc_shuffle"
android:src="@drawable/ic_shuffle_off_24" />
</FrameLayout>
</LinearLayout>