Java 类android.text.style.UpdateAppearance 实例源码

项目:365browser    文件:SelectionPopupController.java   
private boolean hasStyleSpan(Spanned spanned) {
    // Only check against those three classes below, which could affect text appearance, since
    // there are other kind of classes won't affect appearance.
    Class<?>[] styleClasses = {
            CharacterStyle.class, ParagraphStyle.class, UpdateAppearance.class};
    for (Class<?> clazz : styleClasses) {
        if (spanned.nextSpanTransition(-1, spanned.length(), clazz) < spanned.length()) {
            return true;
        }
    }
    return false;
}
项目:365browser    文件:Clipboard.java   
private boolean hasStyleSpan(Spanned spanned) {
    Class<?>[] styleClasses = {
            CharacterStyle.class, ParagraphStyle.class, UpdateAppearance.class};
    for (Class<?> clazz : styleClasses) {
        if (spanned.nextSpanTransition(-1, spanned.length(), clazz) < spanned.length()) {
            return true;
        }
    }
    return false;
}
项目:BactMan-Adventures    文件:ViewUtils.java   
private static void textTransform(TextView view, UpdateAppearance appearance) {
    SpannableString viewText = new SpannableString(view.getText());
    viewText.setSpan(appearance, 0, viewText.length(), 0);
    view.setText(viewText);
}