Hi all,
While working on a widget, I have come across an issue with widget sizing that I think is the result of AbsoluteLayout used by the designer. Of course, I'm no authority on layouts and android development and there might simply be a different issue here.
I'm attaching two screen shots of emulators. One is a 1280x768 (nexus 4) and the other is 480x800(nexus s). As can be seen, the lowres widget is truncated somewhat while the other takes up less space. Note that I have dropped the WorldClock widget (corwin42's advanced widget work) for comparison.
My question is why is it truncating the widget in the low res emulator? I have also tried to install the application on a device with 480x800 resolution and it didn't even show up in the widget list. Why would that be? The target sdk and the api level of the emulator and device are 17 so that is not the reason.
The other issue I have been trying to work around is the widget size in general. I know there are bits and pieces of discussions around this, but I am yet to come across a comprehensive conclusion as to what the best practices are for a widget size when developing in B4A. My widget should be 4x3 cells but it takes up much less space. On a real device, the widget itself is only about 4x2 but takes up space on the homescreen of a 4x3.
Looking at the WorldClock widget, it seems like I may have to write the widget layout XML by hand, outside the designer. However, even that is not as simple as it sounds as the designer fails to compile the application if I change the widget layout to use RelativeLayout. So, what is the process of creating widget layouts outside the designer and then use it in a B4A project?
Any help or tips will be highly appreciated.
EDIT: forgot to mention that the panel housing the widget layout is set to 320x180.
Many Thanks.
HH
While working on a widget, I have come across an issue with widget sizing that I think is the result of AbsoluteLayout used by the designer. Of course, I'm no authority on layouts and android development and there might simply be a different issue here.
I'm attaching two screen shots of emulators. One is a 1280x768 (nexus 4) and the other is 480x800(nexus s). As can be seen, the lowres widget is truncated somewhat while the other takes up less space. Note that I have dropped the WorldClock widget (corwin42's advanced widget work) for comparison.
My question is why is it truncating the widget in the low res emulator? I have also tried to install the application on a device with 480x800 resolution and it didn't even show up in the widget list. Why would that be? The target sdk and the api level of the emulator and device are 17 so that is not the reason.
The other issue I have been trying to work around is the widget size in general. I know there are bits and pieces of discussions around this, but I am yet to come across a comprehensive conclusion as to what the best practices are for a widget size when developing in B4A. My widget should be 4x3 cells but it takes up much less space. On a real device, the widget itself is only about 4x2 but takes up space on the homescreen of a 4x3.
Looking at the WorldClock widget, it seems like I may have to write the widget layout XML by hand, outside the designer. However, even that is not as simple as it sounds as the designer fails to compile the application if I change the widget layout to use RelativeLayout. So, what is the process of creating widget layouts outside the designer and then use it in a B4A project?
Any help or tips will be highly appreciated.
EDIT: forgot to mention that the panel housing the widget layout is set to 320x180.
Many Thanks.
HH
Attachments
Last edited: