When programming on the android I encountered a error called android.view.AbsSavedState which happens whenever you do any type of screen orientation or slide out your keyboard. So I decided the best way for me to avoid this error was to ignore any type of screen orientation.
add a couple of attributes in your manifest file
<activity android:name=”(Put in your activity name if not already entered)” android:screenOrientation=”portrait or landscape (choose one)” android:configChanges=”orientation|keyboardHidden” />
place the following code into the class that extends Activity
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
That it!
References:
- http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged%28android.content.res.Configuration%29
- http://developer.android.com/guide/topics/manifest/activity-element.html
Popularity: 1% [?]
Daniel, a very interesting post thanks for writing it!
I want to thank the blogger very much not only for this post but also for his all previous efforts. I found compscistuff.com to be very interesting. I will be coming back to compscistuff.com for more information.
I just found this blog a while back when a good friend suggested it to me. I’ve been an avid reader ever since.
I just found this blog a while back when a good friend suggested it to me. I’ve been an avid reader ever since.