Following on from my other "resizable appwidgets" post from this morning, 
this is a cross-post from StackOverflow, where the question has had all of 9 
views...

I was happy to see support for resizable appwidgets arrive with Android 3.1, 
but I'm stumped on how to make them actually work.

I'm no appwidget novice, and have no problem adding

android:resizeMode="horizontal|vertical"

to my appwidget definition XML. And that works as far as it goes, the widget 
is nominally resizable (long-press on it and handles appear that let me drag 
the border to different sizes).

Two problems, though:

First, it doesn't appear that my code gets called when the widget is 
resized. A breakpoint set in myonReceive() handler never gets hit, logcat 
messages I put in never appear, and so forth.

Second, assuming that I can get into my code, I can't see anywhere in the 
docs to get the current size of the widget. I'm already using calls to 
AppWidgetProviderInfo.minWidth and .minHeight, but those only reflect the 
minimum dimensions given in the XML, they don't change at runtime.

So, how is one meant to actually implement a resizable widget?

String

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to