Made context menu appear when tapping inside selection.

Change-Id: I7ca274b007f4daea7d37a3d6b10b9504874b3c49
This commit is contained in:
Gilles Debunne
2010-09-09 10:40:22 -07:00
parent 9395b4656a
commit b189249735

View File

@@ -6628,6 +6628,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;