Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As pointed before, if you want to avoid your activity from being recreated on rotation, thus calling onCreate() again, you must declare in your manifest corresponding configChanges.</p> <p>In this case you'll have to set in your configChanges the rotation flag.</p> <pre><code>android:configChanges="orientation" </code></pre> <p>But, starting from Android 3.0 and above you have to declare also the screenSize value.</p> <p>From <a href="http://developer.android.com/guide/topics/resources/runtime-changes.html" rel="noreferrer">http://developer.android.com/guide/topics/resources/runtime-changes.html</a>:</p> <blockquote> <p>Caution: Beginning with Android 3.2 (API level 13), the "screen size" also changes when the device switches between portrait and landscape orientation. Thus, if you want to prevent runtime restarts due to orientation change when developing for API level 13 or higher (as declared by the minSdkVersion and targetSdkVersion attributes), you must include the "screenSize" value in addition to the "orientation" value. That is, you must decalare android:configChanges="orientation|screenSize". However, if your application targets API level 12 or lower, then your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an Android 3.2 or higher device).</p> </blockquote> <p>So, now your configChanges will look:</p> <pre><code>android:configChanges="orientation|screenSize" </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload