try to add this in your manifest android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode". inside oncreate add this.