Hello,

I am working over widget where I need to control the width and height of 
widget programmatically when device rotates from portrait to landscape and 
landscape to protrait.
For this when configuration change I call the below code to update the 
widget width programmatically:

for (int id : appWidgetIds){
    Bundle newOptions = appWidgetManager.getAppWidgetOptions(id);
    int minWidth = 
newOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, 0);
    newOptions.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, minWidth 
- 100);
    appWidgetManager.updateAppWidgetOptions(id, newOptions);
}

After this, I get call onAppWidgetOptionsChanged() with new values but 
widget don't get resized.

However I am also calling onUpdate().

minSdkVersion is 16.

I searched a lot but could not find related to this problem, thanks if 
advance for your valuable time.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to