From a8396686a20ec7219efb3d1e7050c1cd999ec83e Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Wed, 16 Jan 2013 08:39:47 -0800 Subject: [PATCH] docs: Typos and other fixes External 42844 External 42778 External 42768 External 42730 External 42720 External 42678 External 39381 Change-Id: Ia9d54ce87dc266650d0620fd3adc63137322e20b --- core/java/android/view/View.java | 2 +- .../ui_guidelines/icon_design_action_bar.jd | 2 +- .../ui_guidelines/icon_design_dialog.jd | 70 +++++++++++-------- .../ui_guidelines/icon_design_launcher.jd | 2 +- .../ui_guidelines/icon_design_list.jd | 70 +++++++++++-------- .../ui_guidelines/icon_design_status_bar.jd | 2 +- docs/html/guide/topics/ui/notifiers/toasts.jd | 2 +- docs/html/training/animation/cardflip.jd | 4 +- .../training/basics/data-storage/databases.jd | 4 +- .../training/basics/fragments/fragment-ui.jd | 2 +- .../battery-monitoring.jd | 14 ++-- 11 files changed, 97 insertions(+), 77 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 0cc8b62e28881..116eed34af7b6 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6789,7 +6789,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. diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_action_bar.jd b/docs/html/guide/practices/ui_guidelines/icon_design_action_bar.jd index c12b789edda85..9f835a719decd 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_action_bar.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_action_bar.jd @@ -96,7 +96,7 @@ finished Action Bar icon dimensions for each generalized screen density.

- + Action Bar Icon Size diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_dialog.jd b/docs/html/guide/practices/ui_guidelines/icon_design_dialog.jd index e02cdfcfe533d..a2c1459633b68 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_dialog.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_dialog.jd @@ -51,36 +51,46 @@ for suggestions on how to work with multiple sets of icons.

Table 1. Summary of finished dialog icon dimensions for each of the three generalized screen densities.

- - - - - - - - - - - - - - - -
- Low density screen (ldpi) - - Medium density screen (mdpi) - - High density screen (hdpi) -
- 24 x 24 px - - 32 x 32 px - - 48 x 48 px -
- - + + + + + + + + + + + + + + + + + +
+ ldpi (120 dpi)
+ (Low density screen) +
+ mdpi (160 dpi)
+ (Medium density screen) +
+ hdpi (240 dpi)
+ (High density screen) +
+ xhdpi (320 dpi)
+ (Extra-high density screen) +
+ Dialog Icon Size + + 24 x 24 px + + 32 x 32 px + + 48 x 48 px + + 64 x 64 px +

Final art must be exported as a transparent PNG file. Do not include a background color.

diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd index 200c1354ed99e..4ec56b1f0703f 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd @@ -213,7 +213,7 @@ finished launcher icon dimensions for each generalized screen density.

- + Launcher Icon Size diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_list.jd b/docs/html/guide/practices/ui_guidelines/icon_design_list.jd index 2fbce87507e41..38ceb85c58964 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_list.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_list.jd @@ -53,36 +53,46 @@ for suggestions on how to work with multiple sets of icons.

Table 1. Summary of finished list view icon dimensions for each of the three generalized screen densities.

- - - - - - - - - - - - - - - -
- Low density screen (ldpi) - - Medium density screen (mdpi) - - High density screen (hdpi) -
- 24 x 24 px - - 32 x 32 px - - 48 x 48 px -
- - + + + + + + + + + + + + + + + + + +
+ ldpi (120 dpi)
+ (Low density screen) +
+ mdpi (160 dpi)
+ (Medium density screen) +
+ hdpi (240 dpi)
+ (High density screen) +
+ xhdpi (320 dpi)
+ (Extra-high density screen) +
+ List View Icon Size + + 24 x 24 px + + 32 x 32 px + + 48 x 48 px + + 64 x 64 px +

Final art must be exported as a transparent PNG file. Do not include a background color.

diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_status_bar.jd b/docs/html/guide/practices/ui_guidelines/icon_design_status_bar.jd index 8c15777571eda..4cd4db37d83ff 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_status_bar.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_status_bar.jd @@ -155,7 +155,7 @@ finished icon dimensions for each generalized screen density.

- + Status Bar Icon Size
(Android 3.0 and Later) diff --git a/docs/html/guide/topics/ui/notifiers/toasts.jd b/docs/html/guide/topics/ui/notifiers/toasts.jd index 92c146a742ae9..e5d4a0a356516 100644 --- a/docs/html/guide/topics/ui/notifiers/toasts.jd +++ b/docs/html/guide/topics/ui/notifiers/toasts.jd @@ -105,7 +105,7 @@ with the following XML (saved as toast_layout.xml):

</LinearLayout> -

Notice that the ID of the LinearLayout element is "toast_layout". You must use this +

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:

diff --git a/docs/html/training/animation/cardflip.jd b/docs/html/training/animation/cardflip.jd
index ab3eb3af8c0f1..0fccd5751dd5f 100644
--- a/docs/html/training/animation/cardflip.jd
+++ b/docs/html/training/animation/cardflip.jd
@@ -60,7 +60,7 @@ trainingnavtop=true
         animator/card_flip_right_out.xml
       
       
  • - animator/card_flip_right_in.xml + animator/card_flip_left_in.xml
  • animator/card_flip_left_out.xml @@ -362,4 +362,4 @@ private void flipCard() { // Commit the transaction. .commit(); } -
  • \ No newline at end of file + diff --git a/docs/html/training/basics/data-storage/databases.jd b/docs/html/training/basics/data-storage/databases.jd index 8b11983839916..fbefce4f515ce 100644 --- a/docs/html/training/basics/data-storage/databases.jd +++ b/docs/html/training/basics/data-storage/databases.jd @@ -286,7 +286,7 @@ immune to SQL injection.

    // 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); @@ -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, diff --git a/docs/html/training/basics/fragments/fragment-ui.jd b/docs/html/training/basics/fragments/fragment-ui.jd index 4ec4de56366db..1e134cacb5504 100644 --- a/docs/html/training/basics/fragments/fragment-ui.jd +++ b/docs/html/training/basics/fragments/fragment-ui.jd @@ -47,7 +47,7 @@ tablet which has a wider screen size to display more information to the user.

    Figure 1. 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.

    diff --git a/docs/html/training/monitoring-device-state/battery-monitoring.jd b/docs/html/training/monitoring-device-state/battery-monitoring.jd index c963a18624fc2..a2025661e5f85 100644 --- a/docs/html/training/monitoring-device-state/battery-monitoring.jd +++ b/docs/html/training/monitoring-device-state/battery-monitoring.jd @@ -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; +int chargePlug = batteryStatus.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1); +boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB; +boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;

    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.

    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; } } @@ -119,8 +119,8 @@ the rate of your background updates if the battery charge is below a certain lev

    You can find the current battery charge by extracting the current battery level and scale from the battery status intent as shown here:

    -
    int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
    -int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
    +
    int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
    +int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
     
     float batteryPct = level / (float)scale;