views:

24

answers:

2

I'm new at this. I'm using the T-Mobile G1. What I have is a 3 tab app(that is based on the example of the TAB APP). Whenever you switch between portrait and landscape by opening/closing the keyboard,

(1)the screen(s) do not scroll and,

(2)if you are on screen 1 or 2 and open/close the keyboard, the app will reset to screen 0.

I have no idea how to fix the error or where to look for the solution. I would appreciate any help in getting these 2 errors solved. Thank you all for you help and time,

[email protected]

A: 

By default, when the screen rotates your activity is destroyed and recreated in the new orientation. See Configuration Changes for details.

This means that your activity needs to properly save its state in onSaveInstanceBundle and restore it in onCreate.

Mayra
A: 

to avoid the situation that Mayra describes, define the property

android:configChanges="keyboardHidden|orientation"

in your activity inside in your Manifest.xml

     <activity android:name="myActivity"            
...
...
              android:configChanges="keyboardHidden|orientation"        
        /> 
Jorgesys