Merge "docs: Typos and other fixes" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f7c06ddbfc
@ -6794,7 +6794,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
/**
|
||||
* Adds the children of a given View for accessibility. Since some Views are
|
||||
* not important for accessibility the children for accessibility are not
|
||||
* necessarily direct children of the riew, rather they are the first level of
|
||||
* necessarily direct children of the view, rather they are the first level of
|
||||
* descendants important for accessibility.
|
||||
*
|
||||
* @param children The list of children for accessibility.
|
||||
|
@ -96,7 +96,7 @@ finished Action Bar icon dimensions for each generalized screen density.</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<th>
|
||||
Action Bar Icon Size
|
||||
</th>
|
||||
<td>
|
||||
|
@ -51,36 +51,46 @@ for suggestions on how to work with multiple sets of icons.</p>
|
||||
<p class="table-caption"><strong>Table 1.</strong> Summary of finished dialog
|
||||
icon dimensions for each of the three generalized screen densities.</p>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>Low density screen <em>(ldpi)</em></nobr>
|
||||
</th>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>Medium density screen <em>(mdpi)</em></nobr>
|
||||
</th>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>High density screen <em>(hdpi)</em><nobr>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
24 x 24 px
|
||||
</td>
|
||||
<td>
|
||||
32 x 32 px
|
||||
</td>
|
||||
<td>
|
||||
48 x 48 px
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
<code>ldpi</code> (120 dpi)<br>
|
||||
<small style="font-weight: normal">(Low density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>mdpi</code> (160 dpi)<br>
|
||||
<small style="font-weight: normal">(Medium density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>hdpi</code> (240 dpi)<br>
|
||||
<small style="font-weight: normal">(High density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>xhdpi</code> (320 dpi)<br>
|
||||
<small style="font-weight: normal">(Extra-high density screen)</small>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
Dialog Icon Size
|
||||
</th>
|
||||
<td>
|
||||
24 x 24 px
|
||||
</td>
|
||||
<td>
|
||||
32 x 32 px
|
||||
</td>
|
||||
<td>
|
||||
48 x 48 px
|
||||
</td>
|
||||
<td>
|
||||
64 x 64 px
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><strong>Final art must be exported as a transparent PNG file. Do not include
|
||||
a background color</strong>.</p>
|
||||
|
@ -213,7 +213,7 @@ finished launcher icon dimensions for each generalized screen density.</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<th>
|
||||
Launcher Icon Size
|
||||
</th>
|
||||
<td>
|
||||
|
@ -53,36 +53,46 @@ for suggestions on how to work with multiple sets of icons.</p>
|
||||
<p class="table-caption"><strong>Table 1.</strong> Summary of finished list view
|
||||
icon dimensions for each of the three generalized screen densities.</p>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>Low density screen <em>(ldpi)</em></nobr>
|
||||
</th>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>Medium density screen <em>(mdpi)</em></nobr>
|
||||
</th>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<nobr>High density screen <em>(hdpi)</em><nobr>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
24 x 24 px
|
||||
</td>
|
||||
<td>
|
||||
32 x 32 px
|
||||
</td>
|
||||
<td>
|
||||
48 x 48 px
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
<code>ldpi</code> (120 dpi)<br>
|
||||
<small style="font-weight: normal">(Low density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>mdpi</code> (160 dpi)<br>
|
||||
<small style="font-weight: normal">(Medium density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>hdpi</code> (240 dpi)<br>
|
||||
<small style="font-weight: normal">(High density screen)</small>
|
||||
</th>
|
||||
<th>
|
||||
<code>xhdpi</code> (320 dpi)<br>
|
||||
<small style="font-weight: normal">(Extra-high density screen)</small>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
List View Icon Size
|
||||
</th>
|
||||
<td>
|
||||
24 x 24 px
|
||||
</td>
|
||||
<td>
|
||||
32 x 32 px
|
||||
</td>
|
||||
<td>
|
||||
48 x 48 px
|
||||
</td>
|
||||
<td>
|
||||
64 x 64 px
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><strong>Final art must be exported as a transparent PNG file. Do not include
|
||||
a background color</strong>.</p>
|
||||
|
@ -155,7 +155,7 @@ finished icon dimensions for each generalized screen density.</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background-color:#f3f3f3;font-weight:normal">
|
||||
<th>
|
||||
Status Bar Icon Size<br><small>(Android 3.0 and Later)</small>
|
||||
</th>
|
||||
<td>
|
||||
|
@ -105,7 +105,7 @@ with the following XML (saved as <em>toast_layout.xml</em>):</p>
|
||||
</LinearLayout>
|
||||
</pre>
|
||||
|
||||
<p>Notice that the ID of the LinearLayout element is "toast_layout". You must use this
|
||||
<p>Notice that the ID of the LinearLayout element is "toast_layout_root". You must use this
|
||||
ID to inflate the layout from the XML, as shown here:</p>
|
||||
|
||||
<pre>
|
||||
|
@ -70,7 +70,7 @@ trainingnavtop=true
|
||||
<code>animator/card_flip_right_out.xml</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>animator/card_flip_right_in.xml</code>
|
||||
<code>animator/card_flip_left_in.xml</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>animator/card_flip_left_out.xml</code>
|
||||
@ -372,4 +372,4 @@ private void flipCard() {
|
||||
// Commit the transaction.
|
||||
.commit();
|
||||
}
|
||||
</pre>
|
||||
</pre>
|
||||
|
@ -286,7 +286,7 @@ immune to SQL injection.</p>
|
||||
// Define 'where' part of query.
|
||||
String selection = FeedReaderContract.FeedEntry.COLUMN_NAME_ENTRY_ID + " LIKE ?";
|
||||
// Specify arguments in placeholder order.
|
||||
String[] selelectionArgs = { String.valueOf(rowId) };
|
||||
String[] selectionArgs = { String.valueOf(rowId) };
|
||||
// Issue SQL statement.
|
||||
db.delete(table_name, selection, selectionArgs);
|
||||
</pre>
|
||||
@ -311,7 +311,7 @@ values.put(FeedReaderContract.FeedEntry.COLUMN_NAME_TITLE, title);
|
||||
|
||||
// Which row to update, based on the ID
|
||||
String selection = FeedReaderContract.FeedEntry.COLUMN_NAME_ENTRY_ID + " LIKE ?";
|
||||
String[] selelectionArgs = { String.valueOf(rowId) };
|
||||
String[] selectionArgs = { String.valueOf(rowId) };
|
||||
|
||||
int count = db.update(
|
||||
FeedReaderDbHelper.FeedEntry.TABLE_NAME,
|
||||
|
@ -47,7 +47,7 @@ tablet which has a wider screen size to display more information to the user.</p
|
||||
|
||||
<img src="{@docRoot}images/training/basics/fragments-screen-mock.png" alt="" />
|
||||
<p class="img-caption"><strong>Figure 1.</strong> Two fragments, displayed in different
|
||||
configurations for the same activity on different screen sizes. On a large screen, both fragment
|
||||
configurations for the same activity on different screen sizes. On a large screen, both fragments
|
||||
fit side by side, but on a handset device, only one fragment fits at a time so the fragments must
|
||||
replace each other as the user navigates.</p>
|
||||
|
||||
|
@ -65,9 +65,9 @@ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
|
||||
status == BatteryManager.BATTERY_STATUS_FULL;
|
||||
|
||||
// How are we charging?
|
||||
int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
|
||||
boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
|
||||
boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
|
||||
int chargePlug = batteryStatus.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
|
||||
boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
|
||||
boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;</pre>
|
||||
|
||||
<p>Typically you should maximize the rate of your background updates in the case where the device is
|
||||
connected to an AC charger, reduce the rate if the charge is over USB, and lower it
|
||||
@ -105,8 +105,8 @@ the current charging state and method as described in the previous step.</p>
|
||||
status == BatteryManager.BATTERY_STATUS_FULL;
|
||||
|
||||
int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
|
||||
boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
|
||||
boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
|
||||
boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
|
||||
boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;
|
||||
}
|
||||
}</pre>
|
||||
|
||||
@ -119,8 +119,8 @@ the rate of your background updates if the battery charge is below a certain lev
|
||||
<p>You can find the current battery charge by extracting the current battery level and scale from
|
||||
the battery status intent as shown here:</p>
|
||||
|
||||
<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
|
||||
int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
|
||||
<pre>int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
|
||||
int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
|
||||
|
||||
float batteryPct = level / (float)scale;</pre>
|
||||
|
||||
|
Reference in New Issue
Block a user