summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/topics
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/guide/topics')
-rw-r--r--docs/html/guide/topics/appwidgets/index.jd16
-rwxr-xr-xdocs/html/guide/topics/resources/resources-i18n.jd43
2 files changed, 36 insertions, 23 deletions
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index 01a9648..fc0061d 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -150,14 +150,26 @@ folder.</p>
<code>(number of cells * 74) - 2</code><br/>
Following this formula, you should use 72 dp for a height of one cell, 294 dp and for a width of four cells.</p>
</li>
- <li>The <code>updatePerdiodMillis</code> attribute defines how often the App Widget framework should
+ <li>The <code>updatePeriodMillis</code> attribute defines how often the App Widget framework should
request an update from the {@link android.appwidget.AppWidgetProvider} by calling the
{@link android.appwidget.AppWidgetProvider#onUpdate(Context,AppWidgetManager,int[])
onUpdate()} method. The actual update is not guaranteed to occur exactly on time with this value
and we suggest updating as infrequently as possible&mdash;perhaps no more than once an hour to
conserve the battery. You might also allow the user to adjust the frequency in a
configuration&mdash;some people might want a stock ticker to update every 15 minutes, or maybe
- only four times a day.</li>
+ only four times a day.
+ <p class="note"><strong>Note:</strong> If the device is asleep when it is time for an update
+ (as defined by <code>updatePeriodMillis</code>), then the device will wake up in order
+ to perform the update. If you don't update more than once per hour, this probably won't
+ cause significant problems for the battery life. If, however, you need to update more
+ frequently and/or you do not need to update while the device is asleep, then you can instead
+ perform updates based on an alarm that will not wake the device. To do so, set an alarm with
+ an Intent that your AppWidgetProvider receives, using the {@link android.app.AlarmManager}.
+ Set the alarm type to either {@link android.app.AlarmManager#ELAPSED_REALTIME} or
+ {@link android.app.AlarmManager#RTC}, which will only
+ deliver the alarm when the device is awake. Then set <code>updatePeriodMillis</code> to
+ zero (<code>"0"</code>).</p>
+ </li>
<li>The <code>initialLayout</code> attribute points to the layout resource that defines the
App Widget layout.</li>
<li>The <code>configure</code> attribute defines the {@link android.app.Activity} to launch when
diff --git a/docs/html/guide/topics/resources/resources-i18n.jd b/docs/html/guide/topics/resources/resources-i18n.jd
index c26cb63..85b89d1 100755
--- a/docs/html/guide/topics/resources/resources-i18n.jd
+++ b/docs/html/guide/topics/resources/resources-i18n.jd
@@ -465,37 +465,37 @@ MyApp/
</tr>
<tr>
<td>MCC and MNC</td>
- <td>The mobile country code optionally followed by mobile network code
+ <td><p>The mobile country code optionally followed by mobile network code
from the SIM in the device. For example
<code>mcc310</code> (U.S. on any carrier);
<code>mcc310-mnc004</code> (U.S., Verizon brand);
<code>mcc208-mnc00</code> (France, Orange brand);
<code>mcc234-mnc00</code> (U.K., BT brand).
- <p>
+ </p><p>
If the device uses a radio connection (GSM phone), the MCC will come
from the SIM, and the MNC will come from the network to which the
device is attached. You might sometimes use the MCC alone, for example
to include country-specific legal resources in your application. If
your application specifies resources for a MCC/MNC combination, those
- resources can only be used if both the MCC and the MNC match. </td>
+ resources can only be used if both the MCC and the MNC match. </p></td>
</tr>
<tr>
<td>Language and region</td>
- <td>The two letter <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO
+ <td><p>The two letter <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO
639-1</a> language code optionally followed by a two letter
<a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO
3166-1-alpha-2</a> region code (preceded by lowercase &quot;r&quot;). For example
<code>fr</code>, <code>en-rUS</code>, <code>fr-rFR</code>, <code>es-rES</code>.
- <p>
+ </p><p>
The codes are <em>not</em> case-sensitive; the r prefix is used to
distinguish the region portion.
You cannot specify a region alone, but you can specify a language alone,
- for example <code>en</code>, <code>fr</code>, <code>es</code>. </td>
+ for example <code>en</code>, <code>fr</code>, <code>es</code>.</p> </td>
</tr>
<tr>
<td>Screen dimensions</td>
- <td><code>small</code>, <code>normal</code>, <code>large</code>
- <p>
+ <td><p><code>small</code>, <code>normal</code>, <code>large</code>
+ </p><p>
Specify that the resource is for a particular class of screen.
The meanings of these are:</p>
<ul>
@@ -517,27 +517,27 @@ MyApp/
</tr>
<tr>
<td>Wider/taller screens</td>
- <td><code>long</code>, <code>notlong</code>
- <p>
+ <td><p><code>long</code>, <code>notlong</code>
+ </p><p>
Specify that the resource is for a taller/wider than traditional
screen. This is based purely on the aspect ration of the screen:
QVGA, HVGA, and VGA are notlong; WQVGA, WVGA, FWVGA are long. Note
that long may mean either wide or tall, depending on the current
- orientation.
+ orientation.</p>
</td>
</tr>
<tr>
<td>Screen orientation</td>
- <td><code>port</code>, <code>land</code>, <code>square</code>
- <p>
+ <td><p><code>port</code>, <code>land</code>, <code>square</code>
+ </p><p>
Specifies that the resource is for a screen that is tall (port)
- or wide (land); square is not currently used.
+ or wide (land); square is not currently used.</p>
</td>
</tr>
<tr>
<td>Screen pixel density</td>
- <td><code>ldpi</code>, <code>mdpi</code>, <code>hdpi</code>, <code>nodpi</code>
- <p>
+ <td><p><code>ldpi</code>, <code>mdpi</code>, <code>hdpi</code>, <code>nodpi</code>
+ </p><p>
Specifies the screen density the resource is defined for. The medium
density of traditional HVGA screens (mdpi) is defined to be approximately
160dpi; low density (ldpi) is 120, and high density (hdpi) is 240. There
@@ -545,7 +545,7 @@ MyApp/
in ldpi would be 12x12 is mdpi and 16x16 in hdpi. The special
<code>nodpi</code> density can be used with bitmap resources to prevent
them from being scaled at load time to match the device density.
- <p>
+ </p><p>
When Android selects which resource files to use,
it handles screen density differently than the other qualifiers.
In step 1 of <a href="#best-match">How Android finds the best
@@ -553,10 +553,11 @@ MyApp/
be a match. In step 4, if the qualifier being considered is screen
density, Android will select the best final match at that point,
without any need to move on to step 5.
- <p>
+ </p><p>
You can also specify explicit densities like <code>92dpi</code>
or <code>108dpi</code>, but these are not fully supported by the
system so should not be used.
+ </p>
</td>
</tr>
<tr>
@@ -565,9 +566,9 @@ MyApp/
</tr>
<tr>
<td>Whether the keyboard is available to the user</td>
- <td><code>keysexposed</code>, <code>keyshidden</code>, <code>keyssoft</code>
- <p>
- If your application has specific resources that should only be used with a soft keyboard, use the <code>keyssoft</code> value. If no <code>keyssoft</code> resources are available (only <code>keysexposed</code> and <code>keyshidden</code>) and the device shows a soft keyboard, the system will use <code>keysexposed</code> resources. </td>
+ <td><p><code>keysexposed</code>, <code>keyshidden</code>, <code>keyssoft</code>
+ </p><p>
+ If your application has specific resources that should only be used with a soft keyboard, use the <code>keyssoft</code> value. If no <code>keyssoft</code> resources are available (only <code>keysexposed</code> and <code>keyshidden</code>) and the device shows a soft keyboard, the system will use <code>keysexposed</code> resources.</p> </td>
</tr>
<tr>
<td>Primary text input method</td>