2

So I am updating my widget size to go down from a 2x1 widget to a 1x1 widget. What I am finding is that the widget is not updating to a 1x1 widget but staying at a 2x1 widget unless i kill the widget itself and add a new one. Is there a way to have the widget resize by itself?

My current appwidget provider xml looks like this

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:initialKeyguardLayout="@layout/state"
    android:initialLayout="@layout/state"
    android:minHeight="130dp"
    android:minWidth="130dp"
    android:previewImage="@drawable/appwidget_preview"
    android:resizeMode="none"
    android:updatePeriodMillis="10000"
    android:widgetCategory="home_screen"/>

At 160dp width, the launcher shows me a 2x1 widget. Which was the original size of the widget. Now it has been changed to 130dp in order to get a 1x1 widget. If I add a new instance of the widget I get a 1x1 but the existing widget on the home screen does not change in size

ultron
  • 21
  • 5
  • 1
    Yeha sorry about that, just posted some extra information – ultron Aug 28 '19 at 17:35
  • Related: https://stackoverflow.com/q/1860901/437212 https://stackoverflow.com/q/3387742/437212 in that the view itself is owned by another process, and the received wisdom is that the OS provided no facility for handling a reinstall or a deinstall of the app hosting the widget. It would be nice if we could answer either of these from a more modern perspective -- say API 17 or better. –  Aug 29 '19 at 15:14

0 Answers0