Java Code Examples for android.widget.TextView.setLongClickable()

The following are Jave code examples for showing how to use setLongClickable() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: OSchina_resources_android   File: CommentsUtil.java   View Source Code Vote up 6 votes
@SuppressWarnings("deprecation")
public static void formatHtml(Resources resources, TextView textView, String str) {
    if (str == null)
        return;
    str = str.trim();

    textView.setMovementMethod(MyLinkMovementMethod.a());
    textView.setFocusable(false);
    textView.setClickable(false);
    textView.setLongClickable(false);

    if (textView instanceof TweetTextView) {
        ((TweetTextView) textView).setDispatchToParent(true);
    }

    str = TweetTextView.modifyPath(str);
    Spanned span = Html.fromHtml(str);
    span = InputHelper.displayEmoji(resources, span.toString());
    textView.setText(span);
    MyURLSpan.parseLinkText(textView, span);
}
 
Example 2
Project: OSchina_resources_android   File: Tweet.java   View Source Code Vote up 5 votes
public void setLikeUsers(Context contet, TextView likeUser, boolean limit) {
    // 构造多个超链接的html, 通过选中的位置来获取用户名
    if (getLikeCount() > 0 && getLikeUser() != null
            && !getLikeUser().isEmpty()) {
        likeUser.setVisibility(View.VISIBLE);
        likeUser.setMovementMethod(LinkMovementMethod.getInstance());
        likeUser.setFocusable(false);
        likeUser.setLongClickable(false);
        likeUser.setText(addClickablePart(contet, limit), BufferType.SPANNABLE);
    } else {
        likeUser.setVisibility(View.GONE);
        likeUser.setText("");
    }
    likeUser.setVisibility(View.GONE);
}