Update the small/wide widgets to show just the cover art and controls. This is for two reasons: 1. The old layouts wasted space, which didn't make them look very good 2. I want to add a more Material3-eque "Stylistic" widget option for the people who want them. Doing this allows me to pack that option into the widget without having to add a new option.
65 lines
2.5 KiB
XML
65 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<android.widget.LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@android:id/background"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/colorSurface"
|
|
android:gravity="center_vertical"
|
|
android:orientation="vertical"
|
|
android:theme="@style/Theme.Widget">
|
|
|
|
<!--
|
|
This is a throwaway layout designed for the rare edge-case where a 2xN widget is shown
|
|
in landscape mode.
|
|
-->
|
|
|
|
<android.widget.LinearLayout
|
|
style="@style/Widget.Auxio.AppWidget.Panel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<android.widget.ImageView
|
|
android:id="@+id/widget_cover"
|
|
style="@style/Widget.Auxio.Image.Normal"
|
|
android:layout_marginEnd="@dimen/spacing_medium"
|
|
android:contentDescription="@string/desc_no_cover"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_song" />
|
|
|
|
<android.widget.LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<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:text="@string/def_widget_song" />
|
|
|
|
<android.widget.TextView
|
|
android:id="@+id/widget_artist"
|
|
style="@style/Widget.Auxio.TextView.Secondary.AppWidget"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/def_widget_artist" />
|
|
|
|
</android.widget.LinearLayout>
|
|
|
|
<android.widget.ImageButton
|
|
android:id="@+id/widget_play_pause"
|
|
style="@style/Widget.Auxio.Button.AppWidget"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="@string/desc_play_pause"
|
|
android:minWidth="@dimen/size_btn_small"
|
|
android:minHeight="@dimen/size_btn_small"
|
|
android:src="@drawable/sel_playing_state" />
|
|
|
|
</android.widget.LinearLayout>
|
|
</android.widget.LinearLayout>
|