I can’t seem to find anything on the following problem with a widget I want to code:
Apart from the resize-ability introduced in Android 3.1, I want my widget to be resizable in custom launchers like LauncherPro or ADWLauncher. Is there a way I can define how my widget changes its layout once it’s resized? So, for example, button A is shown on the left for 2×1 but is shown on te right for 3×3.
Also I want it to change its appearance/layout when due to screen rotation the widget size changes (because e.g. 3×1 has different height and width in landscape and portrait).
Any hints would be helpful.
Thanks a lot!
Till
Your app widget doesn’t change its layout once it’s resized.
That is not the purpose of resizeable app widgets. Resizing is for the use of
ListView,GridView, etc., that will absorb the additional scrollable space.For that, you should be able to use standard orientation resource sets (e.g.,
res/layout/andres/layout-land/).