Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e756b216 authored by Scott Main's avatar Scott Main
Browse files

docs: add a screenLayout and uiMode values for configChanges attribute

add note that this should be avoided and point to dev guide

Change-Id: I977660c14da71eaf8beb1d630cbb4f6a2f26bb50
parent a6cce790
Loading
Loading
Loading
Loading
+35 −19
Original line number Original line Diff line number Diff line
@@ -8,7 +8,8 @@ page.title=<activity>
          android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
          android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
          android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
          android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
                                 "touchscreen", "keyboard", "keyboardHidden",
                                 "touchscreen", "keyboard", "keyboardHidden",
                                 "navigation", "orientation", "fontScale"]
                                 "navigation", "orientation", "screenLayout",
                                 "fontScale", "uiMode"]
          android:<a href="#enabled">enabled</a>=["true" | "false"]
          android:<a href="#enabled">enabled</a>=["true" | "false"]
          android:<a href="#exclude">excludeFromRecents</a>=["true" | "false"]
          android:<a href="#exclude">excludeFromRecents</a>=["true" | "false"]
          android:<a href="#exported">exported</a>=["true" | "false"]
          android:<a href="#exported">exported</a>=["true" | "false"]
@@ -152,13 +153,19 @@ as described above.
</p></dd>
</p></dd>


<dt><a name="config"></a>{@code android:configChanges}</dt>
<dt><a name="config"></a>{@code android:configChanges}</dt>
<dd>Lists configuration changes that the activity will handle itself.  When 
<dd>Lists configuration changes that the activity will handle itself.  When a configuration
changes that are not listed occur, the activity is shut down and restarted.  
change occurs at runtime, the activity is shut down and restarted by default, but declaring a
When a listed change occurs, the activity remains running and its <code>{@link android.app.Activity#onConfigurationChanged onConfigurationChanged()}</code> 
configuration with this attribute will prevent the activity from being restarted. Instead, the
method is called.
activity remains running and its <code>{@link android.app.Activity#onConfigurationChanged
onConfigurationChanged()}</code> method is called.

<p class="note"><strong>Note:</strong> Using this attribute should be
avoided and used only as a last-resort. Please read <a
href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Changes</a> for more
information about how to properly handle a restart due to a configuration change.</p>


<p>
<p>
Any or all of the following strings can be used to set this attribute.  Values are 
Any or all of the following strings are valid values for this attribute. Multiple values are
separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientation}".
separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientation}".
</p>
</p>


@@ -169,14 +176,14 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
</tr><tr>
</tr><tr>
   <td>"{@code mcc}"</td>
   <td>"{@code mcc}"</td>
   <td>The IMSI mobile country code (MCC) has changed &mdash;
   <td>The IMSI mobile country code (MCC) has changed &mdash;
       that is, a SIM has been detected and updated the MCC.</td>
       a SIM has been detected and updated the MCC.</td>
</tr><tr>
</tr><tr>
   <td>"{@code mnc}"</td>
   <td>"{@code mnc}"</td>
   <td>The IMSI mobile network code (MNC) has changed &mdash;
   <td>The IMSI mobile network code (MNC) has changed &mdash;
       that is, a SIM has been detected and updated the MNC.</td>
       a SIM has been detected and updated the MNC.</td>
</tr><tr>
</tr><tr>
   <td>"{@code locale}"</td>
   <td>"{@code locale}"</td>
   <td>The locale has changed &mdash; for example, the user has selected a new 
   <td>The locale has changed &mdash; the user has selected a new
       language that text should be displayed in.</td>
       language that text should be displayed in.</td>
</tr><tr>
</tr><tr>
   <td>"{@code touchscreen}"</td>
   <td>"{@code touchscreen}"</td>
@@ -188,18 +195,27 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
</tr><tr>
</tr><tr>
   <td>"{@code keyboardHidden}"</td>
   <td>"{@code keyboardHidden}"</td>
   <td>The keyboard accessibility has changed &mdash; for example, the
   <td>The keyboard accessibility has changed &mdash; for example, the
       user has slid the keyboard out to expose it.</td>
       user has revealed the hardware keyboard.</td>
</tr><tr>
</tr><tr>
   <td>"{@code navigation}"</td>
   <td>"{@code navigation}"</td>
   <td>The navigation type has changed.  (This should never normally happen.)</td>
   <td>The navigation type (trackball/dpad) has changed.  (This should never normally happen.)</td>
</tr><tr>
</tr><tr>
   <td>"{@code orientation}"</td>
   <td>"{@code orientation}"</td>
   <td>The screen orientation has changed &mdash; that is, the user has rotated 
   <td>The screen orientation has changed &mdash; the user has rotated
       the device.</td>
       the device.</td>
 </tr><tr>
   <td>"{@code screenLayout}"</td>
   <td>The screen layout has changed &mdash; this might be caused by a
             different display being activated.</td>
 </tr><tr>
 </tr><tr>
  <td>"{@code fontScale}"</td>
  <td>"{@code fontScale}"</td>
   <td>The font scaling factor has changed &mdash; that is, the user has selected 
   <td>The font scaling factor has changed &mdash; the user has selected
       a new global font size.</td>
       a new global font size.</td>
  </tr><tr>
  <td>"{@code uiMode}"</td>
   <td>The user interface mode has changed &mdash; this can be caused when the user places the
device into a desk/car dock or when the the night mode changes. See {@link
android.app.UiModeManager}. <em>Introduced in API Level 8</em>.</td>
  </tr>
  </tr>
</table>
</table>