Merge "Clickable spans - trigger onClick onSingleTapUp"
This commit is contained in:
committed by
Android (Google) Code Review
commit
155c3a88ac
@@ -22,7 +22,7 @@ import android.view.View;
|
||||
/**
|
||||
* If an object of this type is attached to the text of a TextView
|
||||
* with a movement method of LinkMovementMethod, the affected spans of
|
||||
* text can be selected. If clicked, the {@link #onClick} method will
|
||||
* text can be selected. If selected and clicked, the {@link #onClick} method will
|
||||
* be called.
|
||||
*/
|
||||
public abstract class ClickableSpan extends CharacterStyle implements UpdateAppearance {
|
||||
|
||||
@@ -9639,7 +9639,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
return new GestureDetector(mContext,
|
||||
new GestureDetector.SimpleOnGestureListener() {
|
||||
@Override
|
||||
public boolean onSingleTapConfirmed(MotionEvent e) {
|
||||
public boolean onSingleTapUp(MotionEvent e) {
|
||||
if (shouldUseClickableSpanOnClickGestureDetector()) {
|
||||
ClickableSpan[] links = ((Spannable) mText).getSpans(
|
||||
getSelectionStart(), getSelectionEnd(),
|
||||
|
||||
Reference in New Issue
Block a user