Android Question Base panel doesnt fill the widget

ducphu

Active Member
Licensed User
Longtime User
Hi all,
I'm having strange problem while creating a widget. I use AHClock widget from corwin as an example. I tried run AHClock and the 2x1 widget is added correctly. Now then I create my own widget. What I did was create a layout which contains just 1 panel 146x72. I tried to add my widget but, my widget appears as a 3x3 (or 3x2, I'm not very sure) size widget. And my base panel is not fill in the whole widget but still remains in 2x1 size. Anyone knows what is wrong here? Thank you.
 

Peter Simpson

Expert
Licensed User
Longtime User
I'm sorry but I'm not in front of laptop at the moment so I can't give you the actual code. But if you manually enter the widget size into the XML file that the widget uses, that should help you as long as you are sure that everything is correct in the designer. Try searching the forum for widget XML to see what you find. I had the same problem with my tix clock widget then I remembered about the XML file.
 
Upvote 0

ducphu

Active Member
Licensed User
Longtime User
Yeah thank Peter. Now I locked the size in xml to be 110x110 (according to google documentation cell*70 -30) and then manualy set my panel size to be 146x146 follwing cell*74-2. It works!!!
 
Upvote 0
Top