Java Code Examples for android.widget.TextView#getLinksClickable()

The following examples show how to use android.widget.TextView#getLinksClickable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Linkify.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private static final void addLinkMovementMethod(@NonNull TextView t) {
    MovementMethod m = t.getMovementMethod();

    if ((m == null) || !(m instanceof LinkMovementMethod)) {
        if (t.getLinksClickable()) {
            t.setMovementMethod(LinkMovementMethod.getInstance());
        }
    }
}
 
Example 2
Source File: TimeLineUtility.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
public static void addLinks(TextView view) {
    CharSequence content = view.getText();
    view.setText(convertNormalStringToSpannableString(content.toString()));
    if (view.getLinksClickable()) {
        view.setMovementMethod(LongClickableLinkMovementMethod.getInstance());
    }
}
 
Example 3
Source File: TimeLineUtility.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
public static void addLinks(TextView view) {
    CharSequence content = view.getText();
    view.setText(convertNormalStringToSpannableString(content.toString()));
    if (view.getLinksClickable()) {
        view.setMovementMethod(LongClickableLinkMovementMethod.getInstance());
    }
}
 
Example 4
Source File: LinkifyCompat.java    From fanfouapp-opensource with Apache License 2.0 5 votes vote down vote up
private static final void addLinkMovementMethod(final TextView t) {
    final MovementMethod m = t.getMovementMethod();

    if ((m == null) || !(m instanceof LinkMovementMethod)) {
        if (t.getLinksClickable()) {
            t.setMovementMethod(LinkMovementMethod.getInstance());
        }
    }
}