android.text.style.UpdateAppearance Java Examples
The following examples show how to use
android.text.style.UpdateAppearance.
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 Project: android_9.0.0_r45 Author: lulululbj File: TextUtils.java License: Apache License 2.0 | 5 votes |
/** * Returns whether or not the specified spanned text has a style span. * @hide */ public static boolean hasStyleSpan(@NonNull Spanned spanned) { Preconditions.checkArgument(spanned != null); final 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; }
Example #2
Source Project: 365browser Author: mogoweb File: SelectionPopupController.java License: Apache License 2.0 | 5 votes |
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; }
Example #3
Source Project: 365browser Author: mogoweb File: Clipboard.java License: Apache License 2.0 | 5 votes |
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; }
Example #4
Source Project: RichEditor Author: DrownCoder File: UpdateFatory.java License: Apache License 2.0 | 4 votes |
@Override public List<UpdateAppearance> createUpdateSpans(String code) { return null; }
Example #5
Source Project: RichEditor Author: DrownCoder File: IUpdateAppearanceFactory.java License: Apache License 2.0 | votes |
public List<UpdateAppearance> createUpdateSpans(String code);