docs: fix misc doc bugs from external issue tracker

Change-Id: If6ff3476670e42b321d56d4a1482ccff96d4d500
This commit is contained in:
Scott Main
2012-02-09 10:09:14 -08:00
parent 09ff04d789
commit 52bfc24368
14 changed files with 40 additions and 43 deletions

View File

@@ -294,7 +294,7 @@ public class SensorEvent {
* <li>X is defined as the vector product <b>Y.Z</b> (It is tangential to * <li>X is defined as the vector product <b>Y.Z</b> (It is tangential to
* the ground at the device's current location and roughly points East).</li> * the ground at the device's current location and roughly points East).</li>
* <li>Y is tangential to the ground at the device's current location and * <li>Y is tangential to the ground at the device's current location and
* points towards the magnetic North Pole.</li> * points towards magnetic north.</li>
* <li>Z points towards the sky and is perpendicular to the ground.</li> * <li>Z points towards the sky and is perpendicular to the ground.</li>
* </ul> * </ul>
* *

View File

@@ -1386,7 +1386,7 @@ public final class Settings {
public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
/** /**
* SCREEN_BRIGHTNESS_MODE value for manual mode. * SCREEN_BRIGHTNESS_MODE value for automatic mode.
*/ */
public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;

View File

@@ -233,13 +233,5 @@ to emulate:</p>
<td>hw.lcd.density</td> <td>hw.lcd.density</td>
</tr> </tr>
<tr>
<td>Trackball support</td>
<td>Whether there is a trackball present.</td>
<td>hw.trackBall</td>
</tr>
</table> </table>

View File

@@ -179,8 +179,9 @@ page.title=Managing Projects
<dd>Customizable computer-specific properties for the build system. If you use Ant to build <dd>Customizable computer-specific properties for the build system. If you use Ant to build
the project, this contains the path to the SDK installation. Because the content of the file the project, this contains the path to the SDK installation. Because the content of the file
is specific to the local installation of the SDK, maintained it in a source is specific to the local installation of the SDK, the <code>local.properties</code> should not
revision control system. If you use Eclipse, this file is not used.</dd> be maintained in a source revision control system. If you use Eclipse, this file is not
used.</dd>
<dt><code>ant.properties</code></dt> <dt><code>ant.properties</code></dt>

View File

@@ -243,7 +243,7 @@ performing transactions with the provider doesn't need to and instead calls meth
android.content.ContentResolver} object. This leaves a layer of abstraction between the content android.content.ContentResolver} object. This leaves a layer of abstraction between the content
provider and the component requesting information (for security).</p> provider and the component requesting information (for security).</p>
<p>There are separate methods for activiting each type of component:</p> <p>There are separate methods for activating each type of component:</p>
<ul> <ul>
<li>You can start an activity (or give it something new to do) by <li>You can start an activity (or give it something new to do) by
passing an {@link android.content.Intent} to {@link android.content.Context#startActivity passing an {@link android.content.Intent} to {@link android.content.Context#startActivity
@@ -400,7 +400,7 @@ href="{@docRoot}guide/appendix/api-levels.html">API Level</a> 7), you should dec
requirements in your manifest file. That way, devices that do <em>not</em> have a camera and have an requirements in your manifest file. That way, devices that do <em>not</em> have a camera and have an
Android version <em>lower</em> than 2.1 cannot install your application from Android Market.</p> Android version <em>lower</em> than 2.1 cannot install your application from Android Market.</p>
<p>However, you can also declare that your applicaiton uses the camera, but does not <p>However, you can also declare that your application uses the camera, but does not
<em>require</em> it. In that case, your application must perform a check at runtime to determine <em>require</em> it. In that case, your application must perform a check at runtime to determine
if the device has a camera and disable any features that use the camera if one is not available.</p> if the device has a camera and disable any features that use the camera if one is not available.</p>

View File

@@ -491,7 +491,7 @@ href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/Load
LoaderCursor</a> &#8212; A complete version of the LoaderCursor</a> &#8212; A complete version of the
snippet shown above.</li> snippet shown above.</li>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> LoaderThrottle</a> &#8212; An example of how to use throttling to <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> LoaderThrottle</a> &#8212; An example of how to use throttling to
reduce the number of queries a content provider does then its data changes.</li> reduce the number of queries a content provider does when its data changes.</li>
</ul> </ul>
<p>For information on downloading and installing the SDK samples, see <a <p>For information on downloading and installing the SDK samples, see <a

View File

@@ -272,10 +272,11 @@ is "{@code false}", it cannot be instantiated.
</p></dd> </p></dd>
<dt><a name="exclude"></a>{@code android:excludeFromRecents}</dt> <dt><a name="exclude"></a>{@code android:excludeFromRecents}</dt>
<dd>Whether or not the activity should be excluded from the list of recently <dd>Whether or not the task initiated by this activity should be excluded from the list of recently
launched activities that can be displayed to users &mdash; "{@code true}" if used applications ("recent apps"). That is, when this activity is the root activity of a new task,
it should be excluded, and "{@code false}" if it should be included. this attribute determines whether the task should not appear in the list of recent apps. "{@code
The default value is "{@code false}". true}" if the task should be <em>excluded</em> from the list; "{@code false}" if it should be
<em>included</em>. The default value is "{@code false}".
</p></dd> </p></dd>
<dt><a name="exported"></a>{@code android:exported}</dt> <dt><a name="exported"></a>{@code android:exported}</dt>

View File

@@ -1248,7 +1248,6 @@ the right edge, a right gravity clips the left edge, and neither clips both edge
android:drawable="@drawable/android" android:drawable="@drawable/android"
android:clipOrientation="horizontal" android:clipOrientation="horizontal"
android:gravity="left" /&gt; android:gravity="left" /&gt;
&lt;/clip>
</pre> </pre>
<p>The following layout XML applies the clip drawable to a View:</p> <p>The following layout XML applies the clip drawable to a View:</p>
<pre> <pre>

View File

@@ -216,27 +216,29 @@ is specified with a number followed by a unit of measure.
For example: 10px, 2in, 5sp. The following units of measure are supported by Android:</p> For example: 10px, 2in, 5sp. The following units of measure are supported by Android:</p>
<dl> <dl>
<dt>{@code dp}</dt> <dt>{@code dp}</dt>
<dd>Density-independent Pixels - an abstract unit that is based on the physical density of the <dd>Density-independent Pixels - An abstract unit that is based on the physical density of the
screen. These units are relative to a 160 dpi (dots per inch) screen, so <em>{@code 160dp} is screen. These units are relative to a 160 dpi (dots per inch) screen, on which 1dp is roughly equal
always one inch</em> regardless of the screen density. The ratio of dp-to-pixel will change with the to 1px. When running on a higher density screen, the number of pixels used to draw 1dp is scaled up
screen density, but not necessarily in direct proportion. You should use these units when specifying by a factor appropriate for the screen's dpi. Likewise, when on a lower density screen, the number
view dimensions in your layout, so the UI properly scales to render at the same actual size on of pixels used for 1dp is scaled down. The ratio of dp-to-pixel will change with the screen density,
different screens. (The compiler accepts both "dip" and "dp", though "dp" is more consistent with but not necessarily in direct proportion. Using dp units (instead of px units) is a simple solution
"sp".)</dd> to making the view dimensions in your layout resize properly for different screen densities. In
other words, it provides consistency for the real-world sizes of your UI elements across different
devices.</dd>
<dt>{@code sp}</dt> <dt>{@code sp}</dt>
<dd>Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font <dd>Scale-independent Pixels - This is like the dp unit, but it is also scaled by the user's font
size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted
for both the screen density and the user's preference.</dd> for both the screen density and the user's preference.</dd>
<dt>{@code pt}</dt> <dt>{@code pt}</dt>
<dd>Points - 1/72 of an inch based on the physical size of the screen.</dd> <dd>Points - 1/72 of an inch based on the physical size of the screen.</dd>
<dt>{@code px}</dt> <dt>{@code px}</dt>
<dd>Pixels - corresponds to actual pixels on the screen. This unit of measure is not recommended because <dd>Pixels - Corresponds to actual pixels on the screen. This unit of measure is not recommended because
the actual representation can vary across devices; each devices may have a different number of pixels the actual representation can vary across devices; each devices may have a different number of pixels
per inch and may have more or fewer total pixels available on the screen.</dd> per inch and may have more or fewer total pixels available on the screen.</dd>
<dt>{@code mm}</dt> <dt>{@code mm}</dt>
<dd>Millimeters - based on the physical size of the screen.</dd> <dd>Millimeters - Based on the physical size of the screen.</dd>
<dt>{@code in}</dt> <dt>{@code in}</dt>
<dd>Inches - based on the physical size of the screen.</dd> <dd>Inches - Based on the physical size of the screen.</dd>
</dl> </dl>
<p class="note"><strong>Note:</strong> A dimension is a simple resource that is referenced <p class="note"><strong>Note:</strong> A dimension is a simple resource that is referenced

View File

@@ -58,7 +58,7 @@ though.</p>
<p>When your application displays a lot of data, or data that is expensive to fetch, <p>When your application displays a lot of data, or data that is expensive to fetch,
the automatic destruction/creation of the activities can be lead to a the automatic destruction/creation of the activities can be lead to a
painful user experience. Take the example of <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/">Photostream</a>, painful user experience. Take the example of <a href="http://code.google.com/p/apps-for-android/source/browse/#git%2FPhotostream%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fphotostream">Photostream</a>,
a simple Flickr browsing application. After you launch the application and choose a Flickr account, the a simple Flickr browsing application. After you launch the application and choose a Flickr account, the
application downloads a set of 6 photos (on a T-Mobile G1) from the application downloads a set of 6 photos (on a T-Mobile G1) from the
Flickr servers and displays them on screen. To improve the user Flickr servers and displays them on screen. To improve the user
@@ -80,9 +80,9 @@ offers a great API exactly for that purpose.</p>
<p>The Activity class has a special method called <p>The Activity class has a special method called
{@link android.app.Activity#onRetainNonConfigurationInstance()}. This method {@link android.app.Activity#onRetainNonConfigurationInstance()}. This method
can be used to pass an arbitrary object <em>your future self</em> and Android can be used to pass an arbitrary object to <em>your future self</em> and Android
is smart enough to call this method only when needed. In the case of Photostream, is smart enough to call this method only when needed. In the case of Photostream,
the application <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/PhotostreamActivity.java#226">used this method</a> the application used this method
to pass the downloaded images to the future activity on orientation change. to pass the downloaded images to the future activity on orientation change.
The implementation can be summarized like so:</p> The implementation can be summarized like so:</p>
@@ -96,7 +96,7 @@ public Object onRetainNonConfigurationInstance() {
<p>In the new activity, in <code>onCreate()</code>, all you have to do to <p>In the new activity, in <code>onCreate()</code>, all you have to do to
get your object back is to call {@link android.app.Activity#getLastNonConfigurationInstance()}. get your object back is to call {@link android.app.Activity#getLastNonConfigurationInstance()}.
In Photostream, <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/PhotostreamActivity.java#251">this method is invoked</a> In Photostream, this method is invoked
and if the returned value is not null, the grid is loaded with the list of and if the returned value is not null, the grid is loaded with the list of
photos from the previous activity:</p> photos from the previous activity:</p>
@@ -128,3 +128,6 @@ only, not the drawables. Finally, remember that
<code>onRetainNonConfigurationChange()</code> should be used only to retain <code>onRetainNonConfigurationChange()</code> should be used only to retain
data that is expensive to load. Otherwise, keep it simple and let Android data that is expensive to load. Otherwise, keep it simple and let Android
do everything.</p> do everything.</p>
<p>Also read the guide to <a href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
Changes</a>.</p>

View File

@@ -222,8 +222,8 @@ the adb tool. Here's how to do that:</p>
<ol> <ol>
<li>In a terminal, change to the tools directory of the SDK.</li> <li>In a terminal, change to the tools directory of the SDK.</li>
<li>If no emulator instance is running, start an emulator using using the command <code>emulator &</code>.</li> <li>If no emulator instance is running, start an emulator using using the command <code>emulator</code>.</li>
<li>Uninstall the preinstalled app using the command <code>adb uninstall com.android.samples</code>.</li> <li>Uninstall the preinstalled app using the command <code>adb uninstall com.example.android.apis</code>.</li>
<li>Reinstall the app using the command <code>adb install &lt;path to the ApiDemos.apk&gt;</code>. If you are <li>Reinstall the app using the command <code>adb install &lt;path to the ApiDemos.apk&gt;</code>. If you are
working in Eclipse/ADT, you can just compile and run the app in the normal way. </li> working in Eclipse/ADT, you can just compile and run the app in the normal way. </li>
</ol> </ol>

View File

@@ -87,8 +87,7 @@ Open the Notepadv2 class.</p>
menu callback used for the options menu. Here, we add just one line, which will add a menu item menu callback used for the options menu. Here, we add just one line, which will add a menu item
to delete a note. Call <code>menu.add()</code> like so: to delete a note. Call <code>menu.add()</code> like so:
<pre> <pre>
public void onCreateContextMenu(Menu menu, View v, public void onCreateContextMenu(Menu menu, View v, ContextMenuInfo menuInfo) {
ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo); super.onCreateContextMenu(menu, v, menuInfo);
menu.add(0, DELETE_ID, 0, R.string.menu_delete); menu.add(0, DELETE_ID, 0, R.string.menu_delete);
}</pre> }</pre>

View File

@@ -255,7 +255,7 @@ to define its coordinates on the map.</p>
<pre> <pre>
List&lt;Overlay> mapOverlays = mapView.getOverlays(); List&lt;Overlay> mapOverlays = mapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker); Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker);
HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable);</pre> HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable, this);</pre>
<p>All overlay elements on a map are held by the {@code MapView}, so when you want to add some, <p>All overlay elements on a map are held by the {@code MapView}, so when you want to add some,
you have to get a list from the <code>getOverlays()</code> method. Then instantiate the {@link you have to get a list from the <code>getOverlays()</code> method. Then instantiate the {@link

View File

@@ -20,12 +20,12 @@ import android.hardware.Camera;
import android.hardware.Camera.CameraInfo; import android.hardware.Camera.CameraInfo;
/** /**
* The CamcorderProfile class is used to retrieve the * Retrieves the
* predefined camcorder profile settings for camcorder applications. * predefined camcorder profile settings for camcorder applications.
* These settings are read-only. * These settings are read-only.
* *
* The compressed output from a recording session with a given * <p>The compressed output from a recording session with a given
* CamcorderProfile contains two tracks: one for auido and one for video. * CamcorderProfile contains two tracks: one for audio and one for video.
* *
* <p>Each profile specifies the following set of parameters: * <p>Each profile specifies the following set of parameters:
* <ul> * <ul>