android.widget.TextView#isTextSelectable ( )源码实例Demo

下面列出了android.widget.TextView#isTextSelectable ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: sa-sdk-android   文件: VisualUtil.java
public static boolean isForbiddenClick(View v) {
    if (v instanceof WebView || ViewUtil.instanceOfX5WebView(v) || v instanceof AdapterView) {
        return true;
    }
    if (v instanceof TextView) {
        TextView textView = (TextView) v;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
            if (textView.isTextSelectable() && !textView.hasOnClickListeners()) {
                return true;
            }
        }
    }
    return false;
}
 
源代码2 项目: Pix-Art-Messenger   文件: ListSelectionManager.java
private static void startSelection(TextView textView, int start, int end) {
    final CharSequence text = textView.getText();
    if (SUPPORTED && start >= 0 && end > start && textView.isTextSelectable() && text instanceof Spannable) {
        final Spannable spannable = (Spannable) text;
        start = Math.min(start, spannable.length());
        end = Math.min(end, spannable.length());
        Selection.setSelection(spannable, start, end);
        try {
            final Object editor = FIELD_EDITOR != null ? FIELD_EDITOR.get(textView) : textView;
            METHOD_START_SELECTION.invoke(editor);
        } catch (Exception e) {
        }
    }
}
 
源代码3 项目: Conversations   文件: ListSelectionManager.java
private static void startSelection(TextView textView, int start, int end) {
    final CharSequence text = textView.getText();
    if (SUPPORTED && start >= 0 && end > start && textView.isTextSelectable() && text instanceof Spannable) {
        final Spannable spannable = (Spannable) text;
        start = Math.min(start, spannable.length());
        end = Math.min(end, spannable.length());
        Selection.setSelection(spannable, start, end);
        try {
            final Object editor = FIELD_EDITOR != null ? FIELD_EDITOR.get(textView) : textView;
            METHOD_START_SELECTION.invoke(editor);
        } catch (Exception e) {
        }
    }
}
 
源代码4 项目: Overchan-Android   文件: CompatibilityImpl.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static boolean isTextSelectable(TextView textView) {
    return textView.isTextSelectable();
}
 
 方法所在类
 同类方法