Orientation change and onCreate method in Android
Every time when orientation changes, it always calls the onCreate method.
Is it possible to bypass the onCreate method after orientation changed ?
I want to r开发者_运维技巧efresh or redraw the current view only without calling onCreate again. How to do that ?
Thanks.
Yes, it's possible. You can add attribute android:configChanges="orientation"
to your activity declaration in AndroidManifest.xml. This can be done if your activity doesn't change its layout when orientation changes.
精彩评论