AndroidManifest.xmlのActivityにconfigChangesの設定をすると、画面回転時onCreate()の代わりにonConfigChanged()が呼ばれ、Activityの再生成を回避できる。
<activity android:name="com.test.HogeActivity"
android:configChanges="orientation|screenSize" >
More than 5 years have passed since last update.
AndroidManifest.xmlのActivityにconfigChangesの設定をすると、画面回転時onCreate()の代わりにonConfigChanged()が呼ばれ、Activityの再生成を回避できる。
<activity android:name="com.test.HogeActivity"
android:configChanges="orientation|screenSize" >
Register as a new user and use Qiita more conveniently