widgets: revert most widget changes
Revert the introduction of the thin/tiny widgets, but keep the new cover layout I created while working on them. There is simply no way I can cram controls and metadata within the size bucket that the thin widget occupies. I have decided to give up and revert the widget to it's old form. I understand why the thin widget is not appealing. However, the sizing at which a widget can properly accomodate a taller widget is just too precise and not really large enough to justify it's existance.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
See widget_small.xml for an explanation for the ImageView setup.
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
See widget_small.xml for an explanation for the ImageView setup.
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
For this widget form to work, we need to scale the ImageView across a 1:1 aspect ratio.
|
||||
For most widget forms to work, we need to scale the ImageView across a 1:1 aspect ratio.
|
||||
However, since we are working with a RemoteViews instance, we can't just use ConstraintLayout
|
||||
to achieve this. We can use RelativeLayout, but there's no way to force an aspect ratio with
|
||||
that layout. However, if we create an invisible ImageView that contains a massive fixed-size
|
||||
|
||||
@@ -5,22 +5,22 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:theme="@style/Theme.Widget"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
Wrapping the 1:1 ImageView hack in a LinearLayout allows the view to measure greedily
|
||||
without squishing the controls.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
<android.widget.RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<!--
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
See widget_small.xml for an explanation for the ImageView setup.
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
@@ -52,63 +52,53 @@
|
||||
android:src="@drawable/ic_remote_default_cover"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</RelativeLayout>
|
||||
</android.widget.RelativeLayout>
|
||||
|
||||
|
||||
<android.widget.LinearLayout
|
||||
android:id="@+id/widget_panel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium">
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_repeat"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
<android.widget.LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat" />
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev" />
|
||||
<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.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state" />
|
||||
<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.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next" />
|
||||
</android.widget.LinearLayout>
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_play" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_shuffle"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<?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:background="?attr/colorSurface"
|
||||
android:theme="@style/Theme.Widget"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
|
||||
<!--
|
||||
Wrapping the 1:1 ImageView hack in a LinearLayout allows the view to measure greedily
|
||||
without squishing the controls.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<!--
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
android:id="@+id/widget_aspect_ratio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_remote_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.widget.ImageView
|
||||
android:id="@+id/widget_cover"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignStart="@id/widget_aspect_ratio"
|
||||
android:layout_alignTop="@id/widget_aspect_ratio"
|
||||
android:layout_alignEnd="@id/widget_aspect_ratio"
|
||||
android:layout_alignBottom="@id/widget_aspect_ratio"
|
||||
android:src="@drawable/ic_remote_default_cover"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<android.widget.LinearLayout
|
||||
android:id="@+id/widget_panel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium">
|
||||
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state" />
|
||||
|
||||
<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:layout_weight="1"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
See widget_small.xml for an explanation for the ImageView setup.
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
|
||||
Reference in New Issue
Block a user