Activity restart on rotation Android

前端 未结 30 3827
花落未央
花落未央 2020-11-21 04:32

In my Android application, when I rotate the device (slide out the keyboard) then my Activity is restarted (onCreate is called). Now, this is proba

30条回答
  •  情歌与酒
    2020-11-21 05:09

    I just simply added

         android:configChanges="keyboard|keyboardHidden|orientation"
    

    in the manifest file and did not add any onConfigurationChanged method in my activity.

    So every time the keyboard slides out or in nothing happens.

提交回复
热议问题