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:
@@ -6,7 +6,7 @@
|
||||
android:top="-2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:width="@dimen/size_stroke_small"
|
||||
android:color="@color/divider" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid
|
||||
android:color="#00000000" />
|
||||
|
||||
<size
|
||||
android:width="1000px"
|
||||
android:height="1000px"/>
|
||||
</shape>
|
||||
@@ -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>
|
||||
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
TODO: Rejig these dimens to line up with the 8dp grid. Dimens like the stroke should
|
||||
be increased.-->
|
||||
<!-- TODO: Rejig these dimens to line up with the 8dp grid. -->
|
||||
|
||||
<!-- Spacing Namespace | Dimens for padding/margin attributes -->
|
||||
<dimen name="spacing_micro">2dp</dimen>
|
||||
@@ -38,7 +36,8 @@
|
||||
<dimen name="size_clear">32dp</dimen>
|
||||
|
||||
<dimen name="size_app_icon">48dp</dimen>
|
||||
<dimen name="size_stroke">2dp</dimen>
|
||||
<dimen name="size_stroke_small">1dp</dimen>
|
||||
<dimen name="size_stroke_large">2dp</dimen>
|
||||
|
||||
<!-- Text Size Namespace | Text Sizes -->
|
||||
<dimen name="text_size_small">16sp</dimen>
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:padding">@dimen/spacing_micro</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Component.AppWidget.Button" parent="Widget.Component.AppWidget.Button.Base">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<style name="Widget.ProgressBar.Compact" parent="@style/Widget.AppCompat.ProgressBar.Horizontal">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/size_stroke</item>
|
||||
<item name="android:layout_height">@dimen/size_stroke_large</item>
|
||||
<item name="android:progressBackgroundTint">?attr/colorControlNormal</item>
|
||||
<item name="android:progressTint">?attr/colorAccent</item>
|
||||
</style>
|
||||
@@ -216,6 +216,6 @@
|
||||
|
||||
<style name="Widget.Button.Vibrant.Secondary" parent="@style/Widget.Button.Vibrant.Base">
|
||||
<item name="strokeColor">@color/divider</item>
|
||||
<item name="strokeWidth">@dimen/size_stroke</item>
|
||||
<item name="strokeWidth">@dimen/size_stroke_small</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -3,7 +3,7 @@
|
||||
android:description="@string/info_widget_desc"
|
||||
android:initialLayout="@layout/widget_small"
|
||||
android:minResizeWidth="180dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:minResizeHeight="110dp"
|
||||
android:previewLayout="@layout/widget_small"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:minWidth="180dp"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:minWidth="180dp"
|
||||
android:minHeight="110dp"
|
||||
android:minResizeWidth="180dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:minResizeHeight="110dp"
|
||||
android:previewImage="@drawable/ui_widget_preview"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:updatePeriodMillis="0"
|
||||
|
||||
Reference in New Issue
Block a user