0

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 !!!

Hitarth
  • 1,950
  • 3
  • 27
  • 52

3 Answers3

0

Use this

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

or

UiApplication.getUiApplication().popScreen(this);
V.J.
  • 9,492
  • 4
  • 33
  • 49
0
 Application.getApplication().invokeLater(new Runnable() {

 public void run() {
 UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());                                                     
                   }
 }); 
Rince Thomas
  • 4,158
  • 5
  • 25
  • 44
0

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);
Kjuly
  • 34,476
  • 22
  • 104
  • 118
Alex
  • 1
  • 1