Skip to content

Commit d099935

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Clarify WebSettings comments related to zooming."
2 parents caf97c7 + b533fb4 commit d099935

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

core/java/android/webkit/WebSettings.java

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,45 +170,65 @@ public boolean getNavDump() {
170170
}
171171

172172
/**
173-
* Set whether the WebView supports zoom
173+
* Sets whether the WebView should support zooming using its on-screen zoom
174+
* controls and gestures. The particular zoom mechanisms that should be used
175+
* can be set with {@link #setBuiltInZoomControls}. This setting does not
176+
* affect zooming performed using the {@link WebView#zoomIn()} and
177+
* {@link WebView#zoomOut()} methods.
178+
* @param support Whether the WebView should support zoom.
174179
*/
175180
public void setSupportZoom(boolean support) {
176181
throw new MustOverrideException();
177182
}
178183

179184
/**
180-
* Returns whether the WebView supports zoom
185+
* Returns true if the WebView supports zoom. The default is true.
186+
* @return True if the WebView supports zoom.
181187
*/
182188
public boolean supportZoom() {
183189
throw new MustOverrideException();
184190
}
185191

186192
/**
187-
* Sets whether the zoom mechanism built into WebView is used.
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 provided as a View object by
199+
* {@link WebView#getZoomControls()} and the caller is responsible for inserting
200+
* this View into the layout hierarchy. Use of the separate controls is
201+
* deprecated and it is therefore recommended that this setting is always
202+
* enabled.
203+
* @param enabled Whether the WebView should use the built-in zoom mechanism.
188204
*/
189205
public void setBuiltInZoomControls(boolean enabled) {
190206
throw new MustOverrideException();
191207
}
192208

193209
/**
194-
* Returns true if the zoom mechanism built into WebView is being used.
210+
* Returns true if the zoom mechanisms built into WebView are being used.
211+
* The default is false.
212+
* @return True if the zoom mechanisms built into WebView are being used.
195213
*/
196214
public boolean getBuiltInZoomControls() {
197215
throw new MustOverrideException();
198216
}
199217

200218
/**
201-
* Sets whether the on screen zoom buttons are used.
202-
* A combination of built in zoom controls enabled
203-
* and on screen zoom controls disabled allows for pinch to zoom
204-
* to work without the on screen controls
219+
* Sets whether the WebView should display on-screen zoom controls when
220+
* using the built-in zoom mechanisms. See {@link #setBuiltInZoomControls}.
221+
* @param enabled Whether the WebView should display on-screen zoom controls.
205222
*/
206223
public void setDisplayZoomControls(boolean enabled) {
207224
throw new MustOverrideException();
208225
}
209226

210227
/**
211-
* Returns true if the on screen zoom buttons are being used.
228+
* Returns true if the WebView displays on-screen zoom controls when using
229+
* the built-in zoom mechanisms. The default is true.
230+
* @return True if the WebView displays on-screen zoom controls when using
231+
* the built-in zoom mechanisms.
212232
*/
213233
public boolean getDisplayZoomControls() {
214234
throw new MustOverrideException();

0 commit comments

Comments
 (0)