Skip to content

Commit 93dc642

Browse files
committed
docs: fix misc bugs from external tracker
Change-Id: I2be617be23d0ac50baabac561d510633fa9f162a
1 parent 4143781 commit 93dc642

File tree

10 files changed

+136
-125
lines changed

10 files changed

+136
-125
lines changed

core/java/android/view/LayoutInflater.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import java.util.HashMap;
3535

3636
/**
37-
* This class is used to instantiate layout XML file into its corresponding View
38-
* objects. It is never be used directly -- use
37+
* Instantiates a layout XML file into its corresponding {@link android.view.View}
38+
* objects. It is never used directly. Instead, use
3939
* {@link android.app.Activity#getLayoutInflater()} or
4040
* {@link Context#getSystemService} to retrieve a standard LayoutInflater instance
4141
* that is already hooked up to the current context and correctly configured

core/java/android/widget/RemoteViews.java

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ public void setImageViewUri(int viewId, Uri uri) {
11831183
/**
11841184
* Equivalent to calling ImageView.setImageBitmap
11851185
*
1186-
* @param viewId The id of the view whose drawable should change
1186+
* @param viewId The id of the view whose bitmap should change
11871187
* @param bitmap The new Bitmap for the drawable
11881188
*/
11891189
public void setImageViewBitmap(int viewId, Bitmap bitmap) {
@@ -1206,7 +1206,7 @@ public void setEmptyView(int viewId, int emptyViewId) {
12061206
* and {@link Chronometer#start Chronometer.start()} or
12071207
* {@link Chronometer#stop Chronometer.stop()}.
12081208
*
1209-
* @param viewId The id of the view whose text should change
1209+
* @param viewId The id of the {@link Chronometer} to change
12101210
* @param base The time at which the timer would have read 0:00. This
12111211
* time should be based off of
12121212
* {@link android.os.SystemClock#elapsedRealtime SystemClock.elapsedRealtime()}.
@@ -1227,7 +1227,7 @@ public void setChronometer(int viewId, long base, String format, boolean started
12271227
*
12281228
* If indeterminate is true, then the values for max and progress are ignored.
12291229
*
1230-
* @param viewId The id of the view whose text should change
1230+
* @param viewId The id of the {@link ProgressBar} to change
12311231
* @param max The 100% value for the progress bar
12321232
* @param progress The current value of the progress bar.
12331233
* @param indeterminate True if the progress bar is indeterminate,
@@ -1333,7 +1333,7 @@ public void setDrawableParameters(int viewId, boolean targetBackground, int alph
13331333
/**
13341334
* Equivalent to calling {@link android.widget.TextView#setTextColor(int)}.
13351335
*
1336-
* @param viewId The id of the view whose text should change
1336+
* @param viewId The id of the view whose text color should change
13371337
* @param color Sets the text color for all the states (normal, selected,
13381338
* focused) to be this color.
13391339
*/
@@ -1346,7 +1346,7 @@ public void setTextColor(int viewId, int color) {
13461346
*
13471347
* @param appWidgetId The id of the app widget which contains the specified view. (This
13481348
* parameter is ignored in this deprecated method)
1349-
* @param viewId The id of the view whose text should change
1349+
* @param viewId The id of the {@link AbsListView}
13501350
* @param intent The intent of the service which will be
13511351
* providing data to the RemoteViewsAdapter
13521352
* @deprecated This method has been deprecated. See
@@ -1361,7 +1361,7 @@ public void setRemoteAdapter(int appWidgetId, int viewId, Intent intent) {
13611361
* Equivalent to calling {@link android.widget.AbsListView#setRemoteViewsAdapter(Intent)}.
13621362
* Can only be used for App Widgets.
13631363
*
1364-
* @param viewId The id of the view whose text should change
1364+
* @param viewId The id of the {@link AbsListView}
13651365
* @param intent The intent of the service which will be
13661366
* providing data to the RemoteViewsAdapter
13671367
*/
@@ -1372,7 +1372,7 @@ public void setRemoteAdapter(int viewId, Intent intent) {
13721372
/**
13731373
* Equivalent to calling {@link android.widget.AbsListView#smoothScrollToPosition(int, int)}.
13741374
*
1375-
* @param viewId The id of the view whose text should change
1375+
* @param viewId The id of the view to change
13761376
* @param position Scroll to this adapter position
13771377
*/
13781378
public void setScrollPosition(int viewId, int position) {
@@ -1382,7 +1382,7 @@ public void setScrollPosition(int viewId, int position) {
13821382
/**
13831383
* Equivalent to calling {@link android.widget.AbsListView#smoothScrollToPosition(int, int)}.
13841384
*
1385-
* @param viewId The id of the view whose text should change
1385+
* @param viewId The id of the view to change
13861386
* @param offset Scroll by this adapter position offset
13871387
*/
13881388
public void setRelativeScrollPosition(int viewId, int offset) {
@@ -1392,7 +1392,7 @@ public void setRelativeScrollPosition(int viewId, int offset) {
13921392
/**
13931393
* Call a method taking one boolean on a view in the layout for this RemoteViews.
13941394
*
1395-
* @param viewId The id of the view whose text should change
1395+
* @param viewId The id of the view on which to call the method.
13961396
* @param methodName The name of the method to call.
13971397
* @param value The value to pass to the method.
13981398
*/
@@ -1403,7 +1403,7 @@ public void setBoolean(int viewId, String methodName, boolean value) {
14031403
/**
14041404
* Call a method taking one byte on a view in the layout for this RemoteViews.
14051405
*
1406-
* @param viewId The id of the view whose text should change
1406+
* @param viewId The id of the view on which to call the method.
14071407
* @param methodName The name of the method to call.
14081408
* @param value The value to pass to the method.
14091409
*/
@@ -1414,7 +1414,7 @@ public void setByte(int viewId, String methodName, byte value) {
14141414
/**
14151415
* Call a method taking one short on a view in the layout for this RemoteViews.
14161416
*
1417-
* @param viewId The id of the view whose text should change
1417+
* @param viewId The id of the view on which to call the method.
14181418
* @param methodName The name of the method to call.
14191419
* @param value The value to pass to the method.
14201420
*/
@@ -1425,7 +1425,7 @@ public void setShort(int viewId, String methodName, short value) {
14251425
/**
14261426
* Call a method taking one int on a view in the layout for this RemoteViews.
14271427
*
1428-
* @param viewId The id of the view whose text should change
1428+
* @param viewId The id of the view on which to call the method.
14291429
* @param methodName The name of the method to call.
14301430
* @param value The value to pass to the method.
14311431
*/
@@ -1436,7 +1436,7 @@ public void setInt(int viewId, String methodName, int value) {
14361436
/**
14371437
* Call a method taking one long on a view in the layout for this RemoteViews.
14381438
*
1439-
* @param viewId The id of the view whose text should change
1439+
* @param viewId The id of the view on which to call the method.
14401440
* @param methodName The name of the method to call.
14411441
* @param value The value to pass to the method.
14421442
*/
@@ -1447,7 +1447,7 @@ public void setLong(int viewId, String methodName, long value) {
14471447
/**
14481448
* Call a method taking one float on a view in the layout for this RemoteViews.
14491449
*
1450-
* @param viewId The id of the view whose text should change
1450+
* @param viewId The id of the view on which to call the method.
14511451
* @param methodName The name of the method to call.
14521452
* @param value The value to pass to the method.
14531453
*/
@@ -1458,7 +1458,7 @@ public void setFloat(int viewId, String methodName, float value) {
14581458
/**
14591459
* Call a method taking one double on a view in the layout for this RemoteViews.
14601460
*
1461-
* @param viewId The id of the view whose text should change
1461+
* @param viewId The id of the view on which to call the method.
14621462
* @param methodName The name of the method to call.
14631463
* @param value The value to pass to the method.
14641464
*/
@@ -1469,7 +1469,7 @@ public void setDouble(int viewId, String methodName, double value) {
14691469
/**
14701470
* Call a method taking one char on a view in the layout for this RemoteViews.
14711471
*
1472-
* @param viewId The id of the view whose text should change
1472+
* @param viewId The id of the view on which to call the method.
14731473
* @param methodName The name of the method to call.
14741474
* @param value The value to pass to the method.
14751475
*/
@@ -1480,7 +1480,7 @@ public void setChar(int viewId, String methodName, char value) {
14801480
/**
14811481
* Call a method taking one String on a view in the layout for this RemoteViews.
14821482
*
1483-
* @param viewId The id of the view whose text should change
1483+
* @param viewId The id of the view on which to call the method.
14841484
* @param methodName The name of the method to call.
14851485
* @param value The value to pass to the method.
14861486
*/
@@ -1491,7 +1491,7 @@ public void setString(int viewId, String methodName, String value) {
14911491
/**
14921492
* Call a method taking one CharSequence on a view in the layout for this RemoteViews.
14931493
*
1494-
* @param viewId The id of the view whose text should change
1494+
* @param viewId The id of the view on which to call the method.
14951495
* @param methodName The name of the method to call.
14961496
* @param value The value to pass to the method.
14971497
*/
@@ -1502,7 +1502,7 @@ public void setCharSequence(int viewId, String methodName, CharSequence value) {
15021502
/**
15031503
* Call a method taking one Uri on a view in the layout for this RemoteViews.
15041504
*
1505-
* @param viewId The id of the view whose text should change
1505+
* @param viewId The id of the view on which to call the method.
15061506
* @param methodName The name of the method to call.
15071507
* @param value The value to pass to the method.
15081508
*/
@@ -1516,7 +1516,7 @@ public void setUri(int viewId, String methodName, Uri value) {
15161516
* <p class="note">The bitmap will be flattened into the parcel if this object is
15171517
* sent across processes, so it may end up using a lot of memory, and may be fairly slow.</p>
15181518
*
1519-
* @param viewId The id of the view whose text should change
1519+
* @param viewId The id of the view on which to call the method.
15201520
* @param methodName The name of the method to call.
15211521
* @param value The value to pass to the method.
15221522
*/
@@ -1527,7 +1527,7 @@ public void setBitmap(int viewId, String methodName, Bitmap value) {
15271527
/**
15281528
* Call a method taking one Bundle on a view in the layout for this RemoteViews.
15291529
*
1530-
* @param viewId The id of the view whose text should change
1530+
* @param viewId The id of the view on which to call the method.
15311531
* @param methodName The name of the method to call.
15321532
* @param value The value to pass to the method.
15331533
*/
@@ -1536,10 +1536,11 @@ public void setBundle(int viewId, String methodName, Bundle value) {
15361536
}
15371537

15381538
/**
1539+
* Call a method taking one Intent on a view in the layout for this RemoteViews.
15391540
*
1540-
* @param viewId
1541-
* @param methodName
1542-
* @param value
1541+
* @param viewId The id of the view on which to call the method.
1542+
* @param methodName The name of the method to call.
1543+
* @param value The {@link android.content.Intent} to pass the method.
15431544
*/
15441545
public void setIntent(int viewId, String methodName, Intent value) {
15451546
addAction(new ReflectionAction(viewId, methodName, ReflectionAction.INTENT, value));

docs/html/guide/developing/devices/emulator.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ preinstalled applications (such as the dialer) that you can access from your
7878
applications. You can choose what version of the Android system you want to
7979
run in the emulator by configuring AVDs, and you can also customize the
8080
mobile device skin and key mappings. When launching the emulator and at runtime,
81-
you can use a variety of commands and options to control the its behaviors.
81+
you can use a variety of commands and options to control its behavior.
8282
</p>
8383

8484
<p>The Android system image distributed in the SDK contains ARM machine code for

docs/html/guide/developing/tools/emulator.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ the keys of your keyboard. </p>
516516
</tr>
517517
<tr>
518518
<td>Audio volume up button</td>
519-
<td>KEYPAD_PLUS, Ctrl-5</td>
519+
<td>KEYPAD_PLUS, Ctrl-F5</td>
520520
</tr>
521521

522522
<tr>

docs/html/guide/topics/fundamentals/activities.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ is presented to the user when launching the application for the first time. Each
6262
activity can then start another activity in order to perform different actions. Each time a new
6363
activity starts, the previous activity is stopped, but the system preserves the activity
6464
in a stack (the "back stack"). When a new activity starts, it is pushed onto the back stack and
65-
takes user focus. The back stack abides to the basic "last in, first out" queue mechanism,
65+
takes user focus. The back stack abides to the basic "last in, first out" stack mechanism,
6666
so, when the user is done with the current activity and presses the <em>Back</em> button, it
6767
is popped from the stack (and destroyed) and the previous activity resumes. (The back stack is
6868
discussed more in the <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks

docs/html/guide/topics/fundamentals/fragments.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ handset design.</p>
129129

130130
<p>For example&mdash;to continue with the news application example&mdash;the application can embed
131131
two fragments in <em>Activity A</em>, when running on a tablet-sized device. However, on a
132-
handset-sized screen, there's not be enough room for both fragments, so <em>Activity A</em> includes
132+
handset-sized screen, there's not enough room for both fragments, so <em>Activity A</em> includes
133133
only the fragment for the list of articles, and when the user selects an article, it starts
134134
<em>Activity B</em>, which includes the second fragment to read the article. Thus, the application
135135
supports both tablets and handsets by reusing fragments in different combinations, as illustrated in

docs/html/guide/topics/wireless/bluetooth.jd

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,20 @@ if (!mBluetoothAdapter.isEnabled()) {
249249
<p>A dialog will appear requesting user permission to enable Bluetooth, as shown
250250
in Figure 1. If the user responds "Yes," the system will begin to enable Bluetooth
251251
and focus will return to your application once the process completes (or fails).</p>
252-
<p>If enabling Bluetooth succeeds, your Activity will receive the {@link
252+
253+
<p>The {@code REQUEST_ENABLE_BT} constant passed to {@link
254+
android.app.Activity#startActivityForResult(Intent,int) startActivityForResult()} is a locally
255+
defined integer (which must be greater than 0), that the system passes back to you in your
256+
{@link
257+
android.app.Activity#onActivityResult(int,int,Intent) onActivityResult()} implementation as the
258+
<code>requestCode</code> parameter.</p>
259+
260+
<p>If enabling Bluetooth succeeds, your activity receives the {@link
253261
android.app.Activity#RESULT_OK} result code in the {@link
254262
android.app.Activity#onActivityResult(int,int,Intent) onActivityResult()}
255263
callback. If Bluetooth was not enabled
256-
due to an error (or the user responded "No") then the result code will be {@link
257-
android.app.Activity#RESULT_CANCELED}.</p>
264+
due to an error (or the user responded "No") then the result code is {@link
265+
android.app.Activity#RESULT_CANCELED}.</p>
258266
</li>
259267
</ol>
260268

@@ -431,11 +439,11 @@ startActivity(discoverableIntent);
431439

432440
<p>A dialog will be displayed, requesting user permission to make the device
433441
discoverable, as shown in Figure 2. If the user responds "Yes," then the device
434-
will become discoverable for the specified amount of time. Your Activity will
442+
will become discoverable for the specified amount of time. Your activity will
435443
then receive a call to the {@link android.app.Activity#onActivityResult(int,int,Intent)
436444
onActivityResult())} callback, with the result code equal to the duration that the device
437445
is discoverable. If the user responded "No" or if an error occurred, the result code will
438-
be Activity.RESULT_CANCELLED.</p>
446+
be {@link android.app.Activity#RESULT_CANCELED}.</p>
439447

440448
<p class="note"><strong>Note:</strong> If Bluetooth has not been enabled on the device,
441449
then enabling device discoverability will automatically enable Bluetooth.</p>
@@ -568,7 +576,7 @@ socket.</p>
568576
</ol>
569577

570578
<p>The {@link android.bluetooth.BluetoothServerSocket#accept()} call should not
571-
be executed in the main Activity UI thread because it is a blocking call and
579+
be executed in the main activity UI thread because it is a blocking call and
572580
will prevent any other interaction with the application. It usually makes
573581
sense to do all work with a {@link android.bluetooth.BluetoothServerSocket} or {@link
574582
android.bluetooth.BluetoothSocket} in a new
@@ -696,7 +704,7 @@ android.bluetooth.BluetoothSocket#connect()} method times out (after about
696704
12 seconds), then it will throw an exception.</p>
697705
<p>Because {@link
698706
android.bluetooth.BluetoothSocket#connect()} is a blocking call, this connection
699-
procedure should always be performed in a thread separate from the main Activity
707+
procedure should always be performed in a thread separate from the main activity
700708
thread.</p>
701709
<p class="note">Note: You should always ensure that the device is not performing
702710
device discovery when you call {@link
@@ -838,7 +846,7 @@ private class ConnectedThread extends Thread {
838846
try {
839847
// Read from the InputStream
840848
bytes = mmInStream.read(buffer);
841-
// Send the obtained bytes to the UI Activity
849+
// Send the obtained bytes to the UI activity
842850
mHandler.obtainMessage(MESSAGE_READ, bytes, -1, buffer)
843851
.sendToTarget();
844852
} catch (IOException e) {
@@ -847,14 +855,14 @@ private class ConnectedThread extends Thread {
847855
}
848856
}
849857

850-
/* Call this from the main Activity to send data to the remote device */
858+
/* Call this from the main activity to send data to the remote device */
851859
public void write(byte[] bytes) {
852860
try {
853861
mmOutStream.write(bytes);
854862
} catch (IOException e) { }
855863
}
856864

857-
/* Call this from the main Activity to shutdown the connection */
865+
/* Call this from the main activity to shutdown the connection */
858866
public void cancel() {
859867
try {
860868
mmSocket.close();
@@ -866,12 +874,12 @@ private class ConnectedThread extends Thread {
866874
<p>The constructor acquires the necessary streams and once executed, the thread
867875
will wait for data to come through the InputStream. When {@link
868876
java.io.InputStream#read(byte[])} returns with
869-
bytes from the stream, the data is sent to the main Activity using a member
877+
bytes from the stream, the data is sent to the main activity using a member
870878
Handler from the parent class. Then it goes back and waits for more bytes from
871879
the stream.</p>
872880

873881
<p>Sending outgoing data is as simple as calling the thread's
874-
<code>write()</code> method from the main Activity and passing in the bytes to
882+
<code>write()</code> method from the main activity and passing in the bytes to
875883
be sent. This method then simply calls {@link
876884
java.io.OutputStream#write(byte[])} to send the data to the remote device.</p>
877885

docs/html/resources/tutorials/notepad/notepad-ex2.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Open the Notepadv2 class.</p>
8787
menu callback used for the options menu. Here, we add just one line, which will add a menu item
8888
to delete a note. Call <code>menu.add()</code> like so:
8989
<pre>
90-
public void onCreateContextMenu(Menu menu, View v, ContextMenuInfo menuInfo) {
90+
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
9191
super.onCreateContextMenu(menu, v, menuInfo);
9292
menu.add(0, DELETE_ID, 0, R.string.menu_delete);
9393
}</pre>

0 commit comments

Comments
 (0)