UiApplication.getUiApplication().popScreen(ScreeName.this) not working properly

737 views Asked by At

My screen have a lots of content so main VerticalFieldManager have Scroll property set to view all content using scroll.

All Content set properly and i can see all content using Scrollview But when i Scroll this page vertically than i click on my Back Button and i want to pop this screen .. when i click on back button first time nothing happened and when i click on second time this screen pop properly . i dont know what happen at first click evnet .

Other screen pop properly which have not scroll on this screen .

check click evnet of Back Button

UiApplication.getUiApplication().popScreen(CurrenScreenName.this);

Thanks in Advance !!!

3

There are 3 answers

0
Alex On

Same thing happend to me, I used this:

do{
    UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
} while (UiApplication.getUiApplication().getActiveScreen().toString().indexOf("YOUR_CLASS_NAME") < 0);
0
V.J. On

Use this

UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getA‌​ctiveScreen());

or

UiApplication.getUiApplication().popScreen(this);
0
Rince Thomas On
 Application.getApplication().invokeLater(new Runnable() {

 public void run() {
 UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());                                                     
                   }
 });