Merge "Made context menu appear when tapping inside selection." into gingerbread

This commit is contained in:
Gilles Debunne
2010-09-09 11:56:28 -07:00
committed by Android (Google) Code Review

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;