diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/html/guide/appendix/glossary.jd | 2 | ||||
-rw-r--r-- | docs/html/guide/faq/commontasks.jd | 6 | ||||
-rw-r--r-- | docs/html/guide/topics/graphics/2d-graphics.jd | 108 | ||||
-rw-r--r-- | docs/html/guide/topics/manifest/service-element.jd | 4 | ||||
-rw-r--r-- | docs/html/guide/topics/resources/localization.jd | 10 | ||||
-rw-r--r-- | docs/html/guide/topics/search/searchable-config.jd | 2 | ||||
-rw-r--r-- | docs/html/reference/com/google/android/gms/location/LocationRequest.html | 2 | ||||
-rw-r--r-- | docs/html/tools/debugging/ddms.jd | 2 | ||||
-rw-r--r-- | docs/html/tools/testing/testing_eclipse.jd | 2 | ||||
-rw-r--r-- | docs/html/tools/testing/testing_otheride.jd | 2 | ||||
-rw-r--r-- | docs/html/wear/design/index.jd | 2 |
11 files changed, 70 insertions, 72 deletions
diff --git a/docs/html/guide/appendix/glossary.jd b/docs/html/guide/appendix/glossary.jd index af60eb7..db518f9 100644 --- a/docs/html/guide/appendix/glossary.jd +++ b/docs/html/guide/appendix/glossary.jd @@ -94,7 +94,7 @@ excludeFromSuggestions=true Plugin, DDMS is integrated into your development environment. See <a href="{@docRoot}tools/debugging/ddms.html">Using DDMS</a> to learn more about the program.</dd> - <dt id="dialog">Dialog</dt> <dd> A floating window that that acts as a lightweight + <dt id="dialog">Dialog</dt> <dd> A floating window that acts as a lightweight form. A dialog can have button controls only and is intended to perform a simple action (such as button choice) and perhaps return a value. A dialog is not intended to persist in the history stack, contain complex layout, diff --git a/docs/html/guide/faq/commontasks.jd b/docs/html/guide/faq/commontasks.jd index 086721f..2943aef 100644 --- a/docs/html/guide/faq/commontasks.jd +++ b/docs/html/guide/faq/commontasks.jd @@ -653,7 +653,7 @@ and the {@link android.os.Handler} documentation.</p> <p>You can highlight or style the formatting of strings or substrings of text in a TextView object. There are two ways to do this:</p> <ul> - <li>If you use a <a href="{@docRoot}guide/topics/resources/available-resources.html#stringresources">string resource</a>, + <li>If you use a <a href="{@docRoot}guide/topics/resources/string-resource.html">string resource</a>, you can add some simple styling, such as bold or italic using HTML notation. The currently supported tags are: <code>B</code> (bold), <code>I</code> (italic), <code>U</code> (underline), @@ -661,8 +661,8 @@ and the {@link android.os.Handler} documentation.</p> <code>SUP</code> (superscript), <code>SUB</code> (subscript), and <code>STRIKE</code> (strikethrough). So, for example, in res/values/strings.xml you could declare this:<br /> - <code><resource><br /> - <string id="@+id/styled_welcome_message">We + <code><resources><br /> + <string name="styled_welcome_message">We are <b><i>so</i></b> glad to see you.</string><br /> </resources></code></li> <li>To style text on the fly, or to add highlighting or more complex styling, diff --git a/docs/html/guide/topics/graphics/2d-graphics.jd b/docs/html/guide/topics/graphics/2d-graphics.jd index 4b5a121..9cae53c 100644 --- a/docs/html/guide/topics/graphics/2d-graphics.jd +++ b/docs/html/guide/topics/graphics/2d-graphics.jd @@ -228,9 +228,9 @@ graphics such as those used in a game.</p> <p>The following code snippet demonstrates how to build an {@link android.widget.ImageView} that uses an image from drawable resources and add it to the layout.</p> <pre> - LinearLayout mLinearLayout; +LinearLayout mLinearLayout; - protected void onCreate(Bundle savedInstanceState) { +protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create a LinearLayout in which to add the ImageView @@ -241,20 +241,20 @@ graphics such as those used in a game.</p> i.setImageResource(R.drawable.my_image); i.setAdjustViewBounds(true); // set the ImageView bounds to match the Drawable's dimensions i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, - LayoutParams.WRAP_CONTENT)); + LayoutParams.WRAP_CONTENT)); // Add the ImageView to the layout and set the layout as the content view mLinearLayout.addView(i); setContentView(mLinearLayout); - } +} </pre> <p>In other cases, you may want to handle your image resource as a {@link android.graphics.drawable.Drawable} object. To do so, create a Drawable from the resource like so: <pre> - Resources res = mContext.getResources(); - Drawable myImage = res.getDrawable(R.drawable.my_image); - </pre> +Resources res = mContext.getResources(); +Drawable myImage = res.getDrawable(R.drawable.my_image); +</pre> <p class="warning"><strong>Note:</strong> Each unique resource in your project can maintain only one state, no matter how many different objects you may instantiate for it. For example, if you @@ -269,12 +269,12 @@ animation</a>.</p> <p>The XML snippet below shows how to add a resource Drawable to an {@link android.widget.ImageView} in the XML layout (with some red tint just for fun). <pre> - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:tint="#55ff0000" - android:src="@drawable/my_image"/> - </pre> +<ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:tint="#55ff0000" + android:src="@drawable/my_image"/> +</pre> <p>For more information on using project resources, read about <a href="{@docRoot}guide/topics/resources/index.html">Resources and Assets</a>.</p> @@ -305,22 +305,22 @@ specific XML attributes that help define the object <h4 id="drawable-xml-example">Example</h4> <p>Here's some XML that defines a TransitionDrawable:</p> <pre> - <transition xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@drawable/image_expand"> - <item android:drawable="@drawable/image_collapse"> - </transition> - </pre> +<transition xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/image_expand"> + <item android:drawable="@drawable/image_collapse"> +</transition> +</pre> <p>With this XML saved in the file <code>res/drawable/expand_collapse.xml</code>, the following code will instantiate the TransitionDrawable and set it as the content of an ImageView:</p> <pre> - Resources res = mContext.getResources(); - TransitionDrawable transition = (TransitionDrawable) -res.getDrawable(R.drawable.expand_collapse); - ImageView image = (ImageView) findViewById(R.id.toggle_image); - image.setImageDrawable(transition); - </pre> +Resources res = mContext.getResources(); +TransitionDrawable transition = (TransitionDrawable) + res.getDrawable(R.drawable.expand_collapse); +ImageView image = (ImageView) findViewById(R.id.toggle_image); +image.setImageDrawable(transition); +</pre> <p>Then this transition can be run forward (for 1 second) with:</p> <pre>transition.startTransition(1000);</pre> @@ -337,7 +337,7 @@ supported by each.</p> primitive shapes and style them in any way imaginable.</p> <p>A ShapeDrawable is an extension of {@link android.graphics.drawable.Drawable}, so you can use -one where ever +one wherever a Drawable is expected — perhaps for the background of a View, set with {@link android.view.View#setBackgroundDrawable(android.graphics.drawable.Drawable) setBackgroundDrawable()}. @@ -349,27 +349,27 @@ View that Here's a basic extension of the View class that does just this, to draw a ShapeDrawable as a View:</p> <pre> - public class CustomDrawableView extends View { - private ShapeDrawable mDrawable; +public class CustomDrawableView extends View { + private ShapeDrawable mDrawable; - public CustomDrawableView(Context context) { - super(context); + public CustomDrawableView(Context context) { + super(context); - int x = 10; - int y = 10; - int width = 300; - int height = 50; + int x = 10; + int y = 10; + int width = 300; + int height = 50; - mDrawable = new ShapeDrawable(new OvalShape()); - mDrawable.getPaint().setColor(0xff74AC23); - mDrawable.setBounds(x, y, x + width, y + height); - } + mDrawable = new ShapeDrawable(new OvalShape()); + mDrawable.getPaint().setColor(0xff74AC23); + mDrawable.setBounds(x, y, x + width, y + height); + } - protected void onDraw(Canvas canvas) { - mDrawable.draw(canvas); - } - } - </pre> + protected void onDraw(Canvas canvas) { + mDrawable.draw(canvas); + } +} +</pre> <p>In the constructor, a ShapeDrawable is defines as an {@link android.graphics.drawable.shapes.OvalShape}. @@ -379,15 +379,15 @@ then the <p>With the custom View defined, it can be drawn any way you like. With the sample above, we can draw the shape programmatically in an Activity:</p> <pre> - CustomDrawableView mCustomDrawableView; +CustomDrawableView mCustomDrawableView; - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - mCustomDrawableView = new CustomDrawableView(this); +protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mCustomDrawableView = new CustomDrawableView(this); - setContentView(mCustomDrawableView); - } - </pre> + setContentView(mCustomDrawableView); +} +</pre> <p>If you'd like to draw this custom drawable from the XML layout instead of from the Activity, then the CustomDrawable class must override the {@link @@ -396,11 +396,11 @@ then the instantiating a View via inflation from XML. Then add a CustomDrawable element to the XML, like so:</p> <pre> - <com.example.shapedrawable.CustomDrawableView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - /> - </pre> +<com.example.shapedrawable.CustomDrawableView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + /> +</pre> <p>The ShapeDrawable class (like many other Drawable types in the {@link android.graphics.drawable} package) diff --git a/docs/html/guide/topics/manifest/service-element.jd b/docs/html/guide/topics/manifest/service-element.jd index 2213b72..e26f263 100644 --- a/docs/html/guide/topics/manifest/service-element.jd +++ b/docs/html/guide/topics/manifest/service-element.jd @@ -138,7 +138,7 @@ There is no default. The name must be specified. </p></dd> <dt><a name="prmsn"></a>{@code android:permission}</dt> -<dd>The name of a permission that that an entity must have in order to +<dd>The name of a permission that an entity must have in order to launch the service or bind to it. If a caller of <code>{@link android.content.Context#startService startService()}</code>, <code>{@link android.content.Context#bindService bindService()}</code>, or @@ -156,7 +156,7 @@ not protected by a permission. <p> For more information on permissions, see the -<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#sectperm">Permissions</a> +<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a> section in the introduction and a separate document, <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a>. </p></dd> diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd index 1ee6606..0a96a15 100644 --- a/docs/html/guide/topics/resources/localization.jd +++ b/docs/html/guide/topics/resources/localization.jd @@ -433,8 +433,8 @@ application, however, should localize properly.</p> <p>To change the locale in the emulator by using the adb shell. </p>
<ol>
- <li>Pick the locale you want to test and determine its language and region codes, for
-example <code>fr</code> for French and <code>CA</code> for Canada.<br>
+ <li>Pick the locale you want to test and determine its BCP-47 language tag, for
+example, Canadian French would be <code>fr-CA</code>.<br>
</li>
<li>Launch an emulator.</li>
<li>From a command-line shell on the host computer, run the following
@@ -444,16 +444,14 @@ command:<br> the <code>-e</code> option:<br>
<code>adb -e shell</code></li>
<li>At the adb shell prompt (<code>#</code>), run this command: <br>
- <code>setprop persist.sys.language [<em>language code</em>];setprop
-persist.sys.country [<em>country code</em>];stop;sleep 5;start <br>
+ <code>setprop persist.sys.locale [<em>BCP-47 language tag</em>];stop;sleep 5;start <br>
</code>Replace bracketed sections with the appropriate codes from Step
1.</li>
</ol>
<p>For instance, to test in Canadian French:</p>
-<p><code>setprop persist.sys.language fr;setprop persist.sys.country
-CA;stop;sleep 5;start </code></p>
+<p><code>setprop persist.sys.locale fr-CA;stop;sleep 5;start </code></p>
<p>This will cause the emulator to restart. (It will look like a full reboot,
but it is not.) Once the Home screen appears again, re-launch your application (for
diff --git a/docs/html/guide/topics/search/searchable-config.jd b/docs/html/guide/topics/search/searchable-config.jd index 9d2fa94..4874bb4 100644 --- a/docs/html/guide/topics/search/searchable-config.jd +++ b/docs/html/guide/topics/search/searchable-config.jd @@ -329,7 +329,7 @@ user is entering query text. This is added to the <dt><a name="suggestActionMsg"></a><code>android:suggestActionMsg</code></dt> <dd><em>String</em>. An action message to be sent if the action key is pressed while a suggestion is in focus. This is added to the - intent that that the system passes to your searchable activity (using the action + intent that the system passes to your searchable activity (using the action you've defined for the suggestion). To examine the string, use {@link android.content.Intent#getStringExtra getStringExtra(SearchManager.ACTION_MSG)}. This should only be used if all your diff --git a/docs/html/reference/com/google/android/gms/location/LocationRequest.html b/docs/html/reference/com/google/android/gms/location/LocationRequest.html index 4e67554..6145607 100644 --- a/docs/html/reference/com/google/android/gms/location/LocationRequest.html +++ b/docs/html/reference/com/google/android/gms/location/LocationRequest.html @@ -2614,7 +2614,7 @@ From interface <p>This interval is inexact. You may not receive updates at all (if no location sources are available), or you may receive them slower than requested. You may also receive them faster than requested (if other applications are requesting location at a faster interval). - The fastest rate that that you will receive updates can be controlled with + The fastest rate that you will receive updates can be controlled with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code>. By default this fastest rate is 6x the interval frequency. <p>Applications with only the coarse location permission may have their interval silently diff --git a/docs/html/tools/debugging/ddms.jd b/docs/html/tools/debugging/ddms.jd index d2fb47a..1b59875 100644 --- a/docs/html/tools/debugging/ddms.jd +++ b/docs/html/tools/debugging/ddms.jd @@ -140,7 +140,7 @@ parent.link=index.html <li>Click <strong>Get Allocations</strong> to see a list of objects that have been allocated since you clicked on the <strong>Start Tracking</strong> button. You can click on <strong>Get - Allocations</strong> again to append to the list new objects that that have been + Allocations</strong> again to append to the list new objects that have been allocated.</li> <li>To stop tracking or to clear the data and start over, click the <strong>Stop Tracking diff --git a/docs/html/tools/testing/testing_eclipse.jd b/docs/html/tools/testing/testing_eclipse.jd index 7d3be47..6c9d55b 100644 --- a/docs/html/tools/testing/testing_eclipse.jd +++ b/docs/html/tools/testing/testing_eclipse.jd @@ -218,7 +218,7 @@ from Eclipse</a>. <p> Another useful convention is to add the method <code>testPreconditions()</code> to your test class. Use this method to test that the application under test is initialized correctly. If this - test fails, you know that that the initial conditions were in error. When this happens, further + test fails, you know that the initial conditions were in error. When this happens, further test results are suspect, regardless of whether or not the tests succeeded. </p> <p> diff --git a/docs/html/tools/testing/testing_otheride.jd b/docs/html/tools/testing/testing_otheride.jd index 9484158..a774087 100644 --- a/docs/html/tools/testing/testing_otheride.jd +++ b/docs/html/tools/testing/testing_otheride.jd @@ -281,7 +281,7 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd <p> Another useful convention is to add the method <code>testPreConditions()</code> to your test class. Use this method to test that the application under test is initialized correctly. If this - test fails, you know that that the initial conditions were in error. When this happens, further + test fails, you know that the initial conditions were in error. When this happens, further test results are suspect, regardless of whether or not the tests succeeded. </p> <p> diff --git a/docs/html/wear/design/index.jd b/docs/html/wear/design/index.jd index 247cc87..e01d17f 100644 --- a/docs/html/wear/design/index.jd +++ b/docs/html/wear/design/index.jd @@ -164,7 +164,7 @@ Notifications</a>.</p> <img src="{@docRoot}wear/images/circle_voice_B.png" height="200" style="float:right;margin:0 0 20px 40px" /> <img src="{@docRoot}wear/images/circle_voice_A.png" height="200" style="float:right;margin:0 0 20px 40px" /> -<p>Voice replies are primarily used by messaging applications to provide a hands-free way of dictating a short message. You can also provide a up to five suggested replies or “canned responses” that are useful in a wide range of cases. These canned responses can be tapped by the user, allowing for a fast method of sending simple replies in cases where speaking may not be desirable.</p> +<p>Voice replies are primarily used by messaging applications to provide a hands-free way of dictating a short message. You can also provide up to five suggested replies or “canned responses” that are useful in a wide range of cases. These canned responses can be tapped by the user, allowing for a fast method of sending simple replies in cases where speaking may not be desirable.</p> <p>You should attempt to cover a range of simple, neutral replies in your choices. Longer voice replies may be automatically truncated in the Voice reply UI.</p> |