Skip to content

Commit 06d268e

Browse files
author
Steve Block
committed
Clean up JavaDoc for WebView.getZoomControls()
Bug: 5461416 Change-Id: I4f2b5c9e4b4c2b1a38d678cb6756f128670ee490
1 parent 9f7296a commit 06d268e

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

core/java/android/webkit/WebSettings.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,19 @@ public boolean supportZoom() {
190190
}
191191

192192
/**
193-
* Sets whether the WebView should use its built-in zoom mechanisms, as
194-
* opposed to separate zoom controls. The built-in zoom mechanisms comprise
195-
* on-screen zoom controls, which are displayed over the WebView's content,
196-
* and the use of a pinch gesture to control zooming. Whether or not these
197-
* on-screen controls are displayed can be set with {@link #setDisplayZoomControls}.
198-
* The separate zoom controls are no longer supported, so it is recommended
199-
* that this setting is always enabled.
200-
* @param enabled Whether the WebView should use the built-in zoom mechanism.
201-
*/
193+
* Sets whether the WebView should use its built-in zoom mechanisms. The
194+
* built-in zoom mechanisms comprise on-screen zoom controls, which are
195+
* displayed over the WebView's content, and the use of a pinch gesture to
196+
* control zooming. Whether or not these on-screen controls are displayed
197+
* can be set with {@link #setDisplayZoomControls}.
198+
* <p>
199+
* The built-in mechanisms are the only currently supported zoom
200+
* mechanisms, so it is recommended that this setting is always enabled.
201+
* @param enabled Whether the WebView should use its built-in zoom mechanisms.
202+
*/
203+
// This method was intended to select between the built-in zoom mechanisms
204+
// and the separate zoom controls. The latter were obtained using
205+
// {@link WebView#getZoomControls}, which is now hidden.
202206
public void setBuiltInZoomControls(boolean enabled) {
203207
throw new MustOverrideException();
204208
}

core/java/android/webkit/WebView.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,17 +1530,15 @@ public void flingScroll(int vx, int vy) {
15301530
}
15311531

15321532
/**
1533-
* Returns a view containing zoom controls i.e. +/- buttons. The caller is
1534-
* in charge of installing this view to the view hierarchy. This view will
1535-
* become visible when the user starts scrolling via touch and fade away if
1536-
* the user does not interact with it.
1533+
* Gets the zoom controls for the WebView, as a separate View. The caller is
1534+
* responsible for inserting this View into the layout hierarchy.
15371535
* <p/>
1538-
* API version 3 introduces a built-in zoom mechanism that is shown
1539-
* automatically by the MapView. This is the preferred approach for
1540-
* showing the zoom UI.
1536+
* API Level 3 introduced built-in zoom mechanisms for the WebView, as
1537+
* opposed to these separate zoom controls. The built-in mechanisms are
1538+
* preferred and can be enabled using
1539+
* {@link WebSettings#setBuiltInZoomControls}.
15411540
*
1542-
* @deprecated The built-in zoom mechanism is preferred, see
1543-
* {@link WebSettings#setBuiltInZoomControls(boolean)}.
1541+
* @deprecated The built-in zoom mechanisms are preferred.
15441542
* @hide since API version 16.
15451543
*/
15461544
@Deprecated

0 commit comments

Comments
 (0)