widgets: remove compact/mini widgets
Remove the compact and mini widgets, as there seems to be no real way for both controls and metadata to be packed into them.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{header.name}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Songs" />
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@android:id/background"
|
||||
android:background="?attr/colorSurface"
|
||||
android:theme="@style/Theme.Widget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--
|
||||
We can't use ConstraintLayout on widgets due to RemoteView limitations, but
|
||||
for this widget form to work, we need to get the cover to preserve it's aspect
|
||||
ratio. So, we use a fixed-size 1000x1000 drawable and then align the cover view
|
||||
to that so that the bounds will scale properly.
|
||||
This is easily one of the worst layout hacks I've done, but it seems to work.
|
||||
-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_aspect_ratio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_widget_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<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_song"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/widget_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toEndOf="@+id/widget_cover"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_song"
|
||||
style="@style/Widget.Component.AppWidget.TextView.Primary"
|
||||
android:text="@string/def_widget_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_artist"
|
||||
style="@style/Widget.Component.AppWidget.TextView.Secondary"
|
||||
android:text="@string/def_widget_artist" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<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:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?attr/colorSurface"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_song"
|
||||
style="@style/Widget.Component.AppWidget.TextView.Primary"
|
||||
android:text="@string/def_widget_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_artist"
|
||||
style="@style/Widget.Component.AppWidget.TextView.Secondary"
|
||||
android:text="@string/def_widget_artist" />
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user