Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange LWUIT Dialog behaviour while using Dialog.showPacked() with BorderLayout.CENTRE positioning

I am using LWUIT for series 40 for making my J2ME app and I have noticed a strange behavior of the LWUIT-Dialog while using the showPacked() method, the dialog being positioned with BorderLayout.CENTER.

This happens especially in touch phones.

I have attached an image in order to describe my situation.

Image link

Initially the dialog appears as shown in the first part of the image.However,it expands in the next few seconds to become like the one shown in the second part of the image.

Future calls to display the dialog using showPacked appears like the third one.I am clueless as to why this is happening.I want my dialog to appear like the one shown in the first half of the image all the time.Where have I gone wrong?

Note : The content of the Dialog is a an animated label.

like image 699
Arunbalaji Rengarajan Avatar asked Nov 04 '22 06:11

Arunbalaji Rengarajan


1 Answers

I have no idea what the guys did there but I'm guessing they reflow the UI too aggressively. Try setting Dialog.setAutoAdjustDialogSize(false) and see if it solves your problem.

like image 138
Shai Almog Avatar answered Nov 08 '22 05:11

Shai Almog