AndroidManifest.xmlのActivityにconfigChangesの設定をすると、画面回転時onCreate()の代わりにonConfigChanged()が呼ばれ、Activityの再生成を回避できる。
<activity android:name="com.test.HogeActivity"
android:configChanges="orientation|screenSize" >
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
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
Go to list of users who liked