From d5d4e63ea46f513d035992070b376589760d7017 Mon Sep 17 00:00:00 2001
From: Kenny Root
Date: Sat, 13 Jun 2009 06:03:24 -0500
Subject: Documentation: add preposition and clarify permissions
---
docs/html/guide/topics/fundamentals.jd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'docs/html/guide')
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.
runs in isolation from the code of all other applications.
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.
--
cgit v1.1
From 6ee299a327ce3713473eaec748233dc4f7ec466e Mon Sep 17 00:00:00 2001
From: "Yusuf T. Mobile"
Date: Tue, 21 Jul 2009 14:51:39 -0700
Subject: Updated tutorial to no longer use the deprecated
MapView.getZoomControls() function. Also fixed a spelling error.
---
docs/html/guide/tutorials/views/hello-mapview.jd | 40 ++++--------------------
1 file changed, 6 insertions(+), 34 deletions(-)
(limited to 'docs/html/guide')
diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd
index 868bfaa..50cb030 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() {
}
You can actually run this now, but all it does is allow you to pan around the map.
-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 getZoomControls()
-method. Let's do this.
-
-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:
-
-<LinearLayout
- android:id="@+id/zoomview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@id/mapview"
- android:layout_centerHorizontal="true"
-/>
-
- 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.
-
- The last two attributes are available only to an element that's a child of a
- RelativeLayout. layout_alignBottom
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).
- layout_centerHorizontal
centers this on the horizontal plane.
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.
LinearLayout linearLayout;
MapView mapView;
-ZoomControls mZoom;
+
Then initialize each of these in onCreate()
. We'll capture the LinearLayout and
MapView through their layout resources. Then get the ZoomControls from the MapView::
-linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
-mZoom = (ZoomControls) mapView.getZoomControls();
-
- 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.
-
- Now just plug our ZoomControls into the LinearLayout we added:
+mapView.setBuiltInZoomControls(true);
+
- linearLayout.addView(mZoom);
+ 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.
Run it.
--
cgit v1.1