ViewFlipper switching views on screen orientation change

by Marc » Mon, 25 Jan 2010 12:23:24 GMT


Sponsored Links
 I have a 3 nested ViewFlippers which seem to be working ok except that
when I change the screen orientation the view flip back to the first
one of my views, giving the user the impression it went back a few
steps.

I am a bit stumped as to what to do and was hoping someone had some
experience with this. Thanks.

--



ViewFlipper switching views on screen orientation change

by Atif Gulzar » Mon, 25 Jan 2010 13:30:05 GMT


 whenever the orientation is changed the onCreate fuction is called again
(unless you handled it). Means your activity is refreshed.

before orientation change happened  onRetainNonConfigurationInstance()  is
called. You can save you activity state in this function.

And then in onCreate you can get it by calling

Object data = getLastNonConfigurationInstance();


Hope it helps.

--
Best Regards,
Atif Gulzar

I  Unicode, zln 






>


Sponsored Links


ViewFlipper switching views on screen orientation change

by Atif Gulzar » Mon, 25 Jan 2010 13:33:39 GMT


 whenever the orientation is changed the current activity is destroyed and
new one is created and onCreate fuction is called again (unless you handled
it). Means your activity is refreshed.


Before orientation change happened  onRetainNonConfigurationInstan




--
Best Regards,
Atif Gulzar

I  Unicode, zln 







>>



Other Threads

1. Kik and Whatsup

Salam all,

ada yang mengunakan Kik dan atau Whatsupp bersamaan?

Trims,

-- 
-----------------------
@Jouledoc <http://twitter.com/jouledoc>

"Design is not just what it looks like and feels like. Design is how it
works" - Steve Jobs

-- 
===============

2. [WTB] Gel Case White+WarnaWarni+screen protector buat LG Optimus One

as stated di judul... best offer ya

-- 
we start in continous world then we get discrete

-- 
===============

3. DatabaseUtils.InsertHelper SQLiteConstraintException when executing insert

4. Bagaimana cara Rooted Android di LG Optimus ME P350 ?

5. newbie user.mohon bantuan

6. how to stop calling Monkey Runner device connection every time

7. Message Dialog appears, The market billing service is not available, Dungeons Sample, Although i have followed the steps given in documents.