Hello,

I'm developing my first application that consist and application that
has 2 tabs and each tab has 4 buttons.  Each button opens a Dialog or
alertDialog to deal with different functions. All functionality is
contained in one  activity

I know that the activty restarts each time the screen orientation
changes. My problem is how to deal with the screen orientation  and
the leaked window errors that will generate if the orientation changes
when a Dialog or AlertDialog is open. To avoid the leaked window
errors i add a dismiss() function for each dialog/alertdialog but i
need to know what dialog is showed.

To deal with the layouts (layout and layout-land folders) and the
screen orientation, I use the onRetainNonConfigurationInstance()
function to store the data after that in onCreate function load it
when te activity restarts it.

                final SavedData data = (SavedData)
getLastNonConfigurationInstance();
                if(data==null)
                {

                }
                else
                {
                     //code for each tab that was active before screen
orientation...

                }

I want to ask us if I need to rebuild from scratch the dialogs or
there are some way that i don't know... because if i need to rebuild
it, i'll needed to imput code for each Dialog or AlerDialog that i use
in the application. Am i right???

I'm not sure if i explained my problem very well... I tried to do it.
Thanks for your replay

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to