0

Description :

I have created an android app on launching the activity ,i will add some elements in tableLayout from drop down and i will have total count of those elements at bottom.

Issue Facing : When i rotate my screen , the table layout contents or data is getting cleared and re launched . Can anyone get me the solution to keep my table data on roatating the screen also.

Tanveer
  • 97
  • 1
  • 16

2 Answers2

0

try updating your activity tag in manifest file.

<activity android:name=".MyActivity"
      android:configChanges="orientation|keyboardHidden"
      android:label="@string/app_name">
Chirayu
  • 193
  • 1
  • 11
0

I added following properties in my AndroidManifest.xml

 <activity android:name=".MainActivity"
                  android:configChanges="keyboardHidden|orientation|screenSize">
        </activity>
        <activity android:name=".ShoppingListActivity"
                  android:configChanges="keyboardHidden|orientation|screenSize" >
Tanveer
  • 97
  • 1
  • 16