widgets: fix responsiveness issues
Fix some problems with the Pre-12 widget responsiveness backport, most notably the wrong layout being chosen on more dense launcher grids. Also change the default widget size from 2x2 to 3x2 so that it's more readable.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
@@ -12,7 +12,7 @@
|
||||
android:contentDescription="@string/desc_no_cover"
|
||||
android:src="@drawable/ic_song" />
|
||||
|
||||
<LinearLayout style="@style/Widget.Component.AppWidget.Panel.Base">
|
||||
<LinearLayout style="@style/Widget.Component.AppWidget.Panel">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_song"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:contentDescription="@string/desc_no_cover"
|
||||
android:src="@drawable/ic_song" />
|
||||
|
||||
<LinearLayout style="@style/Widget.Component.AppWidget.Panel.Base">
|
||||
<LinearLayout style="@style/Widget.Component.AppWidget.Panel">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_song"
|
||||
|
||||
@@ -44,11 +44,15 @@
|
||||
<style name="Widget.Component.AppWidget.ImageView" parent="">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">0dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:background">?attr/colorSurface</item>
|
||||
<item name="android:scaleType">centerCrop</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Component.AppWidget.Button.Base" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_height">@dimen/height_widget_button</item>
|
||||
<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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:minResizeHeight="110dp"
|
||||
android:previewLayout="@layout/widget_small"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:targetCellWidth="2"
|
||||
android:targetCellWidth="3"
|
||||
android:targetCellHeight="2"
|
||||
android:updatePeriodMillis="0"
|
||||
android:widgetCategory="home_screen" />
|
||||
@@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:initialLayout="@layout/widget_small"
|
||||
android:minWidth="110dp"
|
||||
android:minWidth="180dp"
|
||||
android:minHeight="110dp"
|
||||
android:minResizeWidth="110dp"
|
||||
android:minResizeHeight="110dp"
|
||||
android:previewImage="@drawable/ui_widget_preview"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:updatePeriodMillis="0"
|
||||
|
||||
Reference in New Issue
Block a user