Android - Dealing with a Dialog on Screen Orientation change

后端 未结 3 1597
北恋
北恋 2021-02-20 16:44

I am overriding the onCreateDialog and onPrepareDialog methods or the Dialog class.

I have followed the example from Reto Meier\'s Professional Android Application Devel

3条回答
  •  你的背包
    2021-02-20 16:53

    If you don't want the activity to be recreated when orientation changes. Insert the following line in the AndroidManifest.xml.

    android:configChanges="keyboardHidden|orientation
    

    example:

提交回复
热议问题