widget: no more room in this home screen

pappicio

Active Member
Licensed User
Longtime User
Hi all, I'm adding a widget to a program of mine, but if panel1 in widget design, is rellay big, but even less thn all activity size, when I try to insert as a widget into my device, a toast message appear:"no more room in this home screen", but in designer, the widget is shorter than intere screen, what appen?, and can I force the visualization of it on xml file?, I read on one of xml, width and height: Fill_parent!, can I change that value, or depend from other?
thanks a lot.
Edited:
if I resize the "panel1" in the widget, and it is shorter, I can insert it, and if I resize again, increase the size of "panel1", and update apk into device by compiling again, it appear on home screen, with my desired sizes!
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
Hi all, I'm adding a widget to a program of mine, but if panel1 in widget design, is rellay big, but even less thn all activity size, when I try to insert as a widget into my device, a toast message appear:"no more room in this home screen", but in designer, the widget is shorter than intere screen, what appen?, and can I force the visualization of it on xml file?, I read on one of xml, width and height: Fill_parent!, can I change that value, or depend from other?

To make the widget fit on the homescreen the size should be calculated with the following formula: (<number_of_cells> * 74) - 2
If you want to make it bigger you have to edit the xml files yourself. To make it fit calculate the dimensions for width and height with the above formula and change the minHeight and minWidth properties in the objects/res/xml/xxx_info.xml and then make the file read only. Be aware that your widget then probably won't fit on all screen resolutions (240x320) and in landscape mode.

if I resize the "panel1" in the widget, and it is shorter, I can insert it, and if I resize again, increase the size of "panel1", and update apk into device by compiling again, it appear on home screen, with my desired sizes!

Yes, that's because the widget keeps the old size and is not placed again. Even if you change your widget from a 1x1 widget to a 4x4 widget it gets not resized.
 
Upvote 0
Top