summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2010-09-09 14:23:20 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-09 14:23:20 -0700
commita3dac8b1dc8c5e02c2177b417f6c1d84fd2ae3dd (patch)
tree39048d2584d1829f464bb60c848e2318a1441e6f
parent3748b718a4aedc07a07a636da3ed8587c09c9bcb (diff)
parentca1b26150943829a296bf38e55ff9c55dbd98182 (diff)
downloadframeworks_base-a3dac8b1dc8c5e02c2177b417f6c1d84fd2ae3dd.zip
frameworks_base-a3dac8b1dc8c5e02c2177b417f6c1d84fd2ae3dd.tar.gz
frameworks_base-a3dac8b1dc8c5e02c2177b417f6c1d84fd2ae3dd.tar.bz2
am ca1b2615: am 87e215fd: Merge "Made context menu appear when tapping inside selection." into gingerbread
Merge commit 'ca1b26150943829a296bf38e55ff9c55dbd98182' * commit 'ca1b26150943829a296bf38e55ff9c55dbd98182': Made context menu appear when tapping inside selection.
-rw-r--r--core/java/android/widget/TextView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index cc6a4f5..e15c707 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6689,6 +6689,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (start == end) {
if (start >= prevStart && start < prevEnd) {
+ // Restore previous selection
+ Selection.setSelection((Spannable)mText, prevStart, prevEnd);
// Tapping inside the selection displays the cut/copy/paste context menu.
showContextMenu();
return;