diff options
| author | Cary Clark <cary@android.com> | 2010-11-22 11:02:29 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-11-22 12:41:58 -0500 |
| commit | fc8bf749dab43b7e2d43e7fe23440cc6d66cbc41 (patch) | |
| tree | d86f7f340eb2656de5cf369d4e6c1973a7b40a66 /core | |
| parent | dac85cb8a98f1985254fd58e35d4eb05e0e03e5c (diff) | |
| download | frameworks_base-fc8bf749dab43b7e2d43e7fe23440cc6d66cbc41.zip frameworks_base-fc8bf749dab43b7e2d43e7fe23440cc6d66cbc41.tar.gz frameworks_base-fc8bf749dab43b7e2d43e7fe23440cc6d66cbc41.tar.bz2 | |
add select text to context menu
Make select text available as an external interface
so that the browser can initiate it from a context
menu.
Interface is marked hidden pending API council approval.
companion change in packages/apps/Browser
bug:3214410
Change-Id: I7d513a38cc3a5ac9c0d1b3be39c02e0835bea90a
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 6abd697..602975f 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -3549,6 +3549,15 @@ public class WebView extends AbsoluteLayout * click action, look for a word under the click. If one is found, * animate the text selection into view. * FIXME: no animation code yet */ + return selectText(); + } + + /** + * Select the word at the last click point. + * + * @hide pending API council approval + */ + public boolean selectText() { int x = viewToContentX((int) mLastTouchX + mScrollX); int y = viewToContentY((int) mLastTouchY + mScrollY); setUpSelect(); |
