Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 155c3a88 authored by Andrei Stingaceanu's avatar Andrei Stingaceanu Committed by Android (Google) Code Review
Browse files

Merge "Clickable spans - trigger onClick onSingleTapUp"

parents c15add00 f0ebee91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+1 −1
Original line number Diff line number Diff line
@@ -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(),