diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/html/guide/publishing/versioning.jd | 2 | ||||
-rw-r--r-- | docs/html/guide/topics/fundamentals.jd | 4 | ||||
-rw-r--r-- | docs/html/guide/tutorials/views/hello-mapview.jd | 40 |
3 files changed, 9 insertions, 37 deletions
diff --git a/docs/html/guide/publishing/versioning.jd b/docs/html/guide/publishing/versioning.jd index 216f993..16fc356 100644 --- a/docs/html/guide/publishing/versioning.jd +++ b/docs/html/guide/publishing/versioning.jd @@ -117,7 +117,7 @@ and <code>android:versionName</code> attributes in the <p>In this example, note that <code>android:versionCode</code> value indicates that the current .apk contains the second release of the application code, which corresponds to a minor follow-on release, as shown by the -<code>android:codeName</code> string. </p> +<code>android:versionName</code> string. </p> <p>The Android framework provides an API to let applications query the system for version information about your application. To obtain version information, diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/topics/fundamentals.jd index 71705d3..640e44b 100644 --- a/docs/html/guide/topics/fundamentals.jd +++ b/docs/html/guide/topics/fundamentals.jd @@ -72,8 +72,8 @@ resources are required by other applications.</li> runs in isolation from the code of all other applications.</li> <li>By default, each application is assigned a unique Linux user ID. -Permissions are set so that the application's files are visible only -that user, only to the application itself — although there are ways +Permissions are set so that the application's files are visible only to +that user and only to the application itself — although there are ways to export them to other applications as well.</li> </ul> diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd index 531300f..7a21485 100644 --- a/docs/html/guide/tutorials/views/hello-mapview.jd +++ b/docs/html/guide/tutorials/views/hello-mapview.jd @@ -93,28 +93,6 @@ protected boolean isRouteDisplayed() { } </pre> <p>You can actually run this now, but all it does is allow you to pan around the map.</p> -<p>Android provides a handy {@link android.widget.ZoomControls} widget for zooming in and out of a View. -MapView can automatically hook one for us by requesting it with the <code>getZoomControls()</code> -method. Let's do this.</p> - -<li>Go back to the layout file. We need a new ViewGroup element, in which we'll - place the ZoomControls. Just below the MapView element (but inside the RelativeLayout), add this element: -<pre> -<LinearLayout - android:id="@+id/zoomview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignBottom="@id/mapview" - android:layout_centerHorizontal="true" -/></pre> - - <p>It doesn't really matter what kind of ViewGroup we use, because we just want a - container that we can position within our root RelativeLayout.</p> - - <p>The last two attributes are available only to an element that's a child of a - RelativeLayout. <code>layout_alignBottom</code> aligns the bottom of this element to the bottom of - the element identified with a resource tag (which must be a sibling to this element). - <code>layout_centerHorizontal</code> centers this on the horizontal plane.</p></li> <li>Now go back to the HelloMapView class. We'll now retrieve the ZoomControls object from the MapView and add it to our new layout element. First, at the top of the HelloMapView, @@ -122,24 +100,18 @@ method. Let's do this.</p> <pre> LinearLayout linearLayout; MapView mapView; -ZoomControls mZoom;</pre></li> +</pre> <li>Then initialize each of these in <code>onCreate()</code>. We'll capture the LinearLayout and MapView through their layout resources. Then get the ZoomControls from the MapView:: <pre> -linearLayout = (LinearLayout) findViewById(R.id.zoomview); mapView = (MapView) findViewById(R.id.mapview); -mZoom = (ZoomControls) mapView.getZoomControls();</pre> - - <p>By using the ZoomControls object provided by MapView, we don't have to do any of the work - required to actually perform the zoom operations. The ZoomControls widget that MapView - returns for us is already hooked into the MapView and works as soon as we add it to the - layout. The controls will appear whenever the user touches the map, then dissapear after - a few moments of inactivity.</p></li> - - <li>Now just plug our ZoomControls into the LinearLayout we added: +mapView.setBuiltInZoomControls(true); +</pre> - <pre>linearLayout.addView(mZoom);</pre></li> + <p>By using the built-in zoom control provided by MapView, we don't have to do any of the work + required to actually perform the zoom operations. The controls will appear whenever the user + touches the map, then disappear after a few moments of inactivity.</p></li> <li>Run it.</li> </ol> |