public class EditStyledText extends EditText
Modifier and Type | Class and Description |
---|---|
static class |
EditStyledText.ColorPaletteDrawable |
class |
EditStyledText.EditModeActions |
static interface |
EditStyledText.EditStyledTextNotifier
EditStyledTextInterface provides functions for notifying messages to calling class.
|
static class |
EditStyledText.EditStyledTextSpans |
static class |
EditStyledText.SavedStyledTextState |
static interface |
EditStyledText.StyledTextHtmlConverter |
static class |
EditStyledText.StyledTextInputConnection |
TextView.BufferType, TextView.OnEditorActionListener, TextView.SavedState
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.DrawingCacheQuality, View.FindViewFlags, View.FocusableMode, View.FocusDirection, View.FocusRealDirection, View.LayoutDir, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener, View.ResolvedLayoutDir, View.ScrollBarStyle, View.ScrollIndicators, View.TextAlignment, View.Visibility
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FOREGROUND_COLOR |
static int |
DEFAULT_TRANSPARENT_COLOR
Fixed Values.
|
static int |
HINT_MSG_BIG_SIZE_ERROR |
static int |
HINT_MSG_COPY_BUF_BLANK |
static int |
HINT_MSG_END_COMPOSE |
static int |
HINT_MSG_END_PREVIEW |
static int |
HINT_MSG_NULL
Help message strings.
|
static int |
HINT_MSG_PUSH_COMPETE |
static int |
HINT_MSG_SELECT_END |
static int |
HINT_MSG_SELECT_START |
static char |
IMAGECHAR |
static int |
MODE_ALIGN
The mode of changing alignment.
|
static int |
MODE_BGCOLOR |
static int |
MODE_CANCEL |
static int |
MODE_CLEARSTYLES |
static int |
MODE_COLOR
The mode of changing color.
|
static int |
MODE_COPY
The mode of copy.
|
static int |
MODE_CUT
The mode of changing cut.
|
static int |
MODE_END_EDIT |
static int |
MODE_HORIZONTALLINE |
static int |
MODE_IMAGE |
static int |
MODE_MARQUEE |
static int |
MODE_NOTHING
The mode that no editing action is done.
|
static int |
MODE_PASTE
The mode of paste.
|
static int |
MODE_PREVIEW |
static int |
MODE_RESET |
static int |
MODE_SELECT
The mode of selection.
|
static int |
MODE_SELECTALL |
static int |
MODE_SHOW_MENU |
static int |
MODE_SIZE
The mode of changing size.
|
static int |
MODE_START_EDIT |
static int |
MODE_STOP_SELECT |
static int |
MODE_SWING |
static int |
MODE_TELOP |
static int |
MODE_TEXTVIEWFUNCTION |
static int |
STATE_SELECT_FIX
The state that selection is done and not fixed.
|
static int |
STATE_SELECT_OFF
The state that selection isn't started.
|
static int |
STATE_SELECT_ON
The state that selection is started.
|
static int |
STATE_SELECTED
The state that selection is done, but not fixed.
|
static char |
ZEROWIDTHCHAR |
ACCESSIBILITY_CURSOR_POSITION_UNDEFINED, ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DEBUG_LAYOUT_PROPERTY, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_ACCESSIBILITY_NODE_PROVIDERS, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_UNDEFINED, mAttributes, mBottom, mCachingFailed, mContext, mCurrentAnimation, mDebugViewAttributes, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, mInputEventConsistencyVerifier, mLayoutParams, mLeft, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mParent, mRight, mScrollX, mScrollY, mTag, mTop, mUserPaddingBottom, mUserPaddingLeft, mUserPaddingRight, NAVIGATION_BAR_TRANSIENT, NAVIGATION_BAR_TRANSLUCENT, NAVIGATION_BAR_TRANSPARENT, NAVIGATION_BAR_UNHIDE, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, PUBLIC_STATUS_BAR_VISIBILITY_MASK, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, sPreserveMarginParamsInLayoutParamConversion, STATUS_BAR_DISABLE_BACK, STATUS_BAR_DISABLE_CLOCK, STATUS_BAR_DISABLE_EXPAND, STATUS_BAR_DISABLE_HOME, STATUS_BAR_DISABLE_NOTIFICATION_ALERTS, STATUS_BAR_DISABLE_NOTIFICATION_ICONS, STATUS_BAR_DISABLE_NOTIFICATION_TICKER, STATUS_BAR_DISABLE_RECENT, STATUS_BAR_DISABLE_SEARCH, STATUS_BAR_DISABLE_SYSTEM_INFO, STATUS_BAR_HIDDEN, STATUS_BAR_TRANSIENT, STATUS_BAR_TRANSLUCENT, STATUS_BAR_TRANSPARENT, STATUS_BAR_UNHIDE, STATUS_BAR_VISIBLE, SYSTEM_UI_CLEARABLE_FLAGS, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, SYSTEM_UI_TRANSPARENT, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description |
---|
EditStyledText(Context context) |
EditStyledText(Context context,
AttributeSet attrs) |
EditStyledText(Context context,
AttributeSet attrs,
int defStyle)
EditStyledText extends EditText for managing flow of each editing action.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(int mode,
EditStyledText.EditModeActions.EditModeActionBase action) |
void |
addEditStyledTextListener(EditStyledText.EditStyledTextNotifier estInterface)
Add Notifier.
|
void |
addInputExtra(boolean create,
String extra) |
protected void |
drawableStateChanged()
This function is called whenever the state of the view changes in such
a way that it impacts the state of drawables being shown.
|
int |
getBackgroundColor()
Get Background color of View.
|
int |
getEditMode()
Get the mode of the action.
|
com.android.ex.editstyledtext.EditStyledText.EditorManager |
getEditStyledTextManager() |
int |
getForegroundColor(int pos)
Get Foreground color of View.
|
String |
getHtml()
Get the state of the selection.
|
String |
getHtml(ArrayList<Uri> uris,
boolean escapeFlag)
Get the state of the selection.
|
String |
getHtml(boolean escapeFlag) |
String |
getPreviewHtml() |
int |
getSelectState()
Get the state of the selection.
|
boolean |
isButtonsFocused() |
boolean |
isEditting()
Check whether editing is started or not.
|
boolean |
isSoftKeyBlocked()
Check whether SoftKey is Blocked or not.
|
boolean |
isStyledText()
Check whether styled text or not.
|
void |
onBlockSoftKey() |
void |
onCancelViewManagers() |
void |
onClearStyles() |
protected void |
onCreateContextMenu(ContextMenu menu)
Views should implement this if the view itself is going to add items to
the context menu.
|
InputConnection |
onCreateInputConnection(EditorInfo outAttrs)
Create a new InputConnection for an InputMethod to interact
with the view.
|
void |
onEndEdit()
End of editing styled text
|
void |
onFixSelectedItem()
Fix selection
|
protected void |
onFocusChanged(boolean focused,
int direction,
Rect previouslyFocusedRect)
Called by the view system when the focus state of this view changes.
|
void |
onInsertHorizontalLine() |
void |
onInsertImage() |
void |
onInsertImage(int resId)
InsertImage to TextView by using resource ID
|
void |
onInsertImage(Uri uri)
InsertImage to TextView by using URI
|
void |
onResetEdit() |
void |
onRestoreInstanceState(Parcelable state)
Hook allowing a view to re-apply a representation of its internal state that had previously
been generated by
View.onSaveInstanceState() . |
Parcelable |
onSaveInstanceState()
Hook allowing a view to generate a representation of its internal state
that can later be used to create a new instance with that same state.
|
void |
onStartAction(int mode,
boolean notifyStateChanged) |
void |
onStartAlign()
Start to change Alignment
|
void |
onStartBackgroundColor()
Start to change background color
|
void |
onStartColor()
Start to change color
|
void |
onStartCopy()
Start to copy styled text
|
void |
onStartCut()
Start to cut styled text
|
void |
onStartEdit()
Start to edit styled text
|
void |
onStartMarquee() |
void |
onStartPaste()
Start to paste styled text
|
void |
onStartSelect()
Start to select a text
|
void |
onStartSelectAll()
Start to select all characters
|
void |
onStartShowMenuAlertDialog() |
void |
onStartShowPreview() |
void |
onStartSize()
Start to change size
|
void |
onStartSwing() |
void |
onStartTelop() |
protected void |
onTextChanged(CharSequence text,
int start,
int before,
int after)
This method is called when the text is changed, in case any subclasses
would like to know.
|
boolean |
onTextContextMenuItem(int id)
Called when a context menu option for the text view is selected.
|
boolean |
onTouchEvent(MotionEvent event)
Implement this method to handle touch screen motion events.
|
void |
onUnblockSoftKey() |
void |
removeEditStyledTextListener(EditStyledText.EditStyledTextNotifier estInterface)
Remove Notifier.
|
void |
setAlignAlertParams(CharSequence aligntitle,
CharSequence[] alignnames) |
void |
setAlignment(Layout.Alignment align)
Set Alignment of the Item.
|
void |
setBackgroundColor(int color)
Set Background color of View.
|
void |
setBuilder(AlertDialog.Builder builder)
Set Builder for AlertDialog.
|
void |
setColorAlertParams(CharSequence colortitle,
CharSequence[] colornames,
CharSequence[] colorints,
CharSequence transparent)
Set Parameters for ColorAlertDialog.
|
void |
setContextMenuStrings(CharSequence horizontalline,
CharSequence clearstyles,
CharSequence paste) |
void |
setHtml(String html)
Set html to EditStyledText.
|
void |
setItemColor(int color)
Set Color of the Item.
|
void |
setItemSize(int size)
Set Size of the Item.
|
void |
setMarquee(int marquee) |
void |
setMarqueeAlertParams(CharSequence marqueetitle,
CharSequence[] marqueenames) |
void |
setSizeAlertParams(CharSequence sizetitle,
CharSequence[] sizenames,
CharSequence[] sizedisplayints,
CharSequence[] sizesendints)
Set Parameters for SizeAlertDialog.
|
void |
setStyledTextHtmlConverter(EditStyledText.StyledTextHtmlConverter html) |
extendSelection, getAccessibilityClassName, getDefaultEditable, getDefaultMovementMethod, getFreezesText, getText, onInitializeAccessibilityNodeInfoInternal, selectAll, setEllipsize, setSelection, setSelection, setText
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, deleteText_internal, didTouchFocusSelect, drawableHotspotChanged, encodeProperties, endBatchEdit, extractText, findViewsWithText, getAccessibilitySelectionEnd, getAccessibilitySelectionStart, getAutoLinkMask, getBaseline, getBottomPaddingOffset, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getEditableText, getEditorForTesting, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFadeHeight, getFadeTop, getFilters, getFocusedRect, getFontFeatureSettings, getGravity, getHighlightColor, getHint, getHintTextColors, getHorizontallyScrolling, getHorizontalOffsetForDrawables, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getIterableTextForAccessibility, getIteratorForGranularity, getKeyListener, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLetterSpacing, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinksClickable, getLinkTextColors, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getScaledTextSize, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getSpellCheckerLocale, getTextColor, getTextColors, getTextColors, getTextDirectionHeuristic, getTextLocale, getTextLocales, getTextScaleX, getTextServicesLocale, getTextSize, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getTypefaceStyle, getUndoManager, getUrls, getWordIterator, handleBackInTextActionModeIfNeeded, hasOverlappingRendering, hasSelection, hideErrorIfUnchanged, invalidateDrawable, isAccessibilitySelectionExtendable, isCursorVisible, isInExtractedMode, isInputMethodTarget, isPaddingOffsetRequired, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, makeNewLayout, makeSingleLayout, moveCursorToVisibleOffset, onActivityResult, onAttachedToWindow, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCommitCorrection, onConfigurationChanged, onCreateDrawableState, onDetachedFromWindowInternal, onDragEvent, onDraw, onEditorAction, onEndBatchEdit, onGenericMotionEvent, onInitializeAccessibilityEventInternal, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onPopulateAccessibilityEventInternal, onPreDraw, onPrivateIMECommand, onProvideStructure, onResolveDrawables, onResolvePointerIcon, onRtlPropertiesChanged, onScreenStateChanged, onScrollChanged, onSelectionChanged, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, performAccessibilityActionInternal, performLongClick, preloadFontCache, removeTextChangedListener, replaceText_internal, resetErrorChangedFlag, resetResolvedDrawables, sendAccessibilityEventInternal, setAccessibilitySelection, setAllCaps, setAutoLinkMask, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCursorPosition_internal, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEms, setEnabled, setError, setError, setExtractedText, setExtracting, setFilters, setFontFeatureSettings, setFrame, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, setLetterSpacing, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSingleLine, setSpan_internal, setSpannableFactory, setText, setText, setText, setText, setTextAppearance, setTextAppearance, setTextColor, setTextColor, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextLocales, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setUndoManager, setWidth, showContextMenu, showContextMenu, stopTextActionMode, verifyDrawable, viewClicked
addChildrenForAccessibility, addFocusables, addFocusables, addFrameMetricsListener, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, applyDrawableToTransparentRegion, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelPendingInputEvents, canHaveDisplayList, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, captureTransitioningViews, checkInputConnectionProxy, clearAccessibilityFocus, clearAnimation, clearFocus, combineMeasuredStates, computeFitSystemWindows, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeOpaqueFlags, computeSystemWindowInsets, computeVerticalScrollOffset, createAccessibilityNodeInfo, createAccessibilityNodeInfoInternal, createContextMenu, createSnapshot, damageInParent, debug, debugIndent, destroyDrawingCache, destroyHardwareResources, dispatchActivityResult, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchGetDisplayList, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerEvent, dispatchPopulateAccessibilityEvent, dispatchPopulateAccessibilityEventInternal, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, encode, findFocus, findNamedViews, findViewByAccessibilityIdTraversal, findViewById, findViewByPredicate, findViewByPredicateInsideOut, findViewByPredicateTraversal, findViewTraversal, findViewWithTag, findViewWithTagTraversal, fitsSystemWindows, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, gatherTransparentRegion, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAccessibilityViewId, getAccessibilityWindowId, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBoundsOnScreen, getBoundsOnScreen, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHardwareRenderer, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollFactor, getHotspotBounds, getId, getImportantForAccessibility, getInverseMatrix, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOpticalInsets, getOutlineProvider, getOutsets, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getRawLayoutDirection, getRawTextAlignment, getRawTextDirection, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getVerticalScrollFactor, getViewRootImpl, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowDisplayFrame, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, handleScrollBarDragging, hasFocus, hasFocusable, hasHoveredChild, hasNestedScrollingParent, hasOnClickListeners, hasOpaqueScrollbars, hasShadow, hasTransientState, hasWindowFocus, includeForAccessibility, inflate, initializeFadingEdge, initializeFadingEdgeInternal, initializeScrollbars, initializeScrollbarsInternal, internalSetPadding, invalidate, invalidate, invalidate, invalidateOutline, invalidateParentCaches, invalidateParentIfNeeded, invalidateParentIfNeededAndWasQuickRejected, isAccessibilityFocused, isActionableForAccessibility, isActivated, isAssistBlocked, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isForegroundInsidePadding, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInScrollingContainer, isInTouchMode, isLaidOut, isLayoutDirectionInherited, isLayoutDirectionResolved, isLayoutModeOptical, isLayoutRequested, isLayoutRtl, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isRootNamespace, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentInherited, isTextAlignmentResolved, isTextDirectionInherited, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVerticalScrollBarHidden, isVisibleToUser, isVisibleToUser, layout, makeOptionalFitsSystemWindows, measure, mergeDrawableStates, notifySubtreeAccessibilityStateChangedIfNeeded, notifyViewAccessibilityStateChangedIfNeeded, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCloseSystemDialogs, onDetachedFromWindow, onDisplayHint, onDrawForeground, onDrawHorizontalScrollBar, onDrawScrollBars, onDrawVerticalScrollBar, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusLost, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onOverScrolled, onPopulateAccessibilityEvent, onProvideVirtualStructure, onRenderNodeDetached, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, outputDirtyFlags, overScrollBy, performAccessibilityAction, performButtonActionOnTouchDown, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, pointInView, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, recomputePadding, refreshDrawableState, removeCallbacks, removeFrameMetricsListener, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestAccessibilityFocus, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestKeyboardShortcuts, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resetPaddingToInitialValues, resetResolvedLayoutDirection, resetResolvedPadding, resetResolvedTextAlignment, resetResolvedTextDirection, resetRtlProperties, resolveDrawables, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveSize, resolveSizeAndState, resolveTextAlignment, resolveTextDirection, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, sendAccessibilityEventUncheckedInternal, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAssistBlocked, setBackground, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDisabledSystemUiVisibility, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setIsRootNamespace, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOpticalInsets, setOutlineProvider, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealClip, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTagInternal, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, startActionMode, startActionMode, startActivityForResult, startAnimation, startDrag, startDragAndDrop, startMovingTask, startNestedScroll, stopNestedScroll, toGlobalMotionEvent, toLocalMotionEvent, toString, transformFromViewToWindowSpace, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDisplayListIfDirty, updateDragShadow, willNotCacheDrawing, willNotDraw
public static final int MODE_NOTHING
public static final int MODE_COPY
public static final int MODE_PASTE
public static final int MODE_SIZE
public static final int MODE_COLOR
public static final int MODE_SELECT
public static final int MODE_ALIGN
public static final int MODE_CUT
public static final int MODE_TELOP
public static final int MODE_SWING
public static final int MODE_MARQUEE
public static final int MODE_SELECTALL
public static final int MODE_HORIZONTALLINE
public static final int MODE_STOP_SELECT
public static final int MODE_CLEARSTYLES
public static final int MODE_IMAGE
public static final int MODE_BGCOLOR
public static final int MODE_PREVIEW
public static final int MODE_CANCEL
public static final int MODE_TEXTVIEWFUNCTION
public static final int MODE_START_EDIT
public static final int MODE_END_EDIT
public static final int MODE_RESET
public static final int MODE_SHOW_MENU
public static final int STATE_SELECT_OFF
public static final int STATE_SELECT_ON
public static final int STATE_SELECTED
public static final int STATE_SELECT_FIX
public static final int HINT_MSG_NULL
public static final int HINT_MSG_COPY_BUF_BLANK
public static final int HINT_MSG_SELECT_START
public static final int HINT_MSG_SELECT_END
public static final int HINT_MSG_PUSH_COMPETE
public static final int HINT_MSG_BIG_SIZE_ERROR
public static final int HINT_MSG_END_PREVIEW
public static final int HINT_MSG_END_COMPOSE
public static final int DEFAULT_TRANSPARENT_COLOR
public static final int DEFAULT_FOREGROUND_COLOR
public static final char ZEROWIDTHCHAR
public static final char IMAGECHAR
public EditStyledText(Context context, AttributeSet attrs, int defStyle)
public EditStyledText(Context context, AttributeSet attrs)
public EditStyledText(Context context)
public boolean onTouchEvent(MotionEvent event)
View
If this method is used to detect click actions, it is recommended that
the actions be performed by implementing and calling
View.performClick()
. This will ensure consistent system behavior,
including:
ACTION_CLICK
when
accessibility features are enabled
onTouchEvent
in class TextView
event
- The motion event.public Parcelable onSaveInstanceState()
View
Some examples of things you may store here: the current cursor position in a text view (but usually not the text itself since that is stored in a content provider or other persistent storage), the currently selected item in a list view.
onSaveInstanceState
in class TextView
View.onRestoreInstanceState(android.os.Parcelable)
,
View.saveHierarchyState(android.util.SparseArray)
,
View.dispatchSaveInstanceState(android.util.SparseArray)
,
View.setSaveEnabled(boolean)
public void onRestoreInstanceState(Parcelable state)
View
View.onSaveInstanceState()
. This function will never be called with a
null state.onRestoreInstanceState
in class TextView
state
- The frozen state that had previously been returned by
View.onSaveInstanceState()
.View.onSaveInstanceState()
,
View.restoreHierarchyState(android.util.SparseArray)
,
View.dispatchRestoreInstanceState(android.util.SparseArray)
protected void drawableStateChanged()
View
If the View has a StateListAnimator, it will also be called to run necessary state change animations.
Be sure to call through to the superclass when overriding this function.
drawableStateChanged
in class TextView
Drawable.setState(int[])
public boolean onTextContextMenuItem(int id)
TextView
android.R.id#selectAll
, android.R.id#cut
,
android.R.id#copy
, android.R.id#paste
or android.R.id#shareText
.onTextContextMenuItem
in class TextView
protected void onCreateContextMenu(ContextMenu menu)
View
onCreateContextMenu
in class TextView
menu
- the context menu to populateprotected void onTextChanged(CharSequence text, int start, int before, int after)
TextView
text
, the lengthAfter
characters
beginning at start
have just replaced old text that had
length lengthBefore
. It is an error to attempt to make
changes to text
from this callback.onTextChanged
in class TextView
text
- The text the TextView is displayingstart
- The offset of the start of the range of the text that was
modifiedbefore
- The length of the former text that has been replacedafter
- The length of the replacement modified textpublic InputConnection onCreateInputConnection(EditorInfo outAttrs)
View
When implementing this, you probably also want to implement
View.onCheckIsTextEditor()
to indicate you will return a
non-null InputConnection.
Also, take good care to fill in the EditorInfo
object correctly and in its entirety, so that the connected IME can rely
on its values. For example, EditorInfo.initialSelStart
and EditorInfo.initialSelEnd
members
must be filled in with the correct cursor position for IMEs to work correctly
with your application.
onCreateInputConnection
in class TextView
outAttrs
- Fill in with attribute information about the connection.protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)
View
onFocusChanged
in class TextView
focused
- True if the View has focus; false otherwise.direction
- The direction focus has moved when requestFocus()
is called to give this view focus. Values are
View.FOCUS_UP
, View.FOCUS_DOWN
, View.FOCUS_LEFT
,
View.FOCUS_RIGHT
, View.FOCUS_FORWARD
, or View.FOCUS_BACKWARD
.
It may not always apply, in which case use the default.previouslyFocusedRect
- The rectangle, in this view's coordinate
system, of the previously focused view. If applicable, this will be
passed in as finer grained information about where the focus is coming
from (in addition to direction). Will be null
otherwise.public void setStyledTextHtmlConverter(EditStyledText.StyledTextHtmlConverter html)
public void addEditStyledTextListener(EditStyledText.EditStyledTextNotifier estInterface)
public void removeEditStyledTextListener(EditStyledText.EditStyledTextNotifier estInterface)
public boolean isButtonsFocused()
public void onStartEdit()
public void onEndEdit()
public void onResetEdit()
public void onStartCopy()
public void onStartCut()
public void onStartPaste()
public void onStartSize()
public void onStartColor()
public void onStartBackgroundColor()
public void onStartAlign()
public void onStartTelop()
public void onStartSwing()
public void onStartMarquee()
public void onStartSelect()
public void onStartSelectAll()
public void onStartShowPreview()
public void onStartShowMenuAlertDialog()
public void onStartAction(int mode, boolean notifyStateChanged)
public void onFixSelectedItem()
public void onInsertImage()
public void onInsertImage(Uri uri)
uri
- URI of the iamge inserted to TextView.public void onInsertImage(int resId)
resId
- Resource ID of the iamge inserted to TextView.public void onInsertHorizontalLine()
public void onClearStyles()
public void onBlockSoftKey()
public void onUnblockSoftKey()
public void onCancelViewManagers()
public void setItemSize(int size)
size
- The size of the Item.public void setItemColor(int color)
color
- The color of the Item.public void setAlignment(Layout.Alignment align)
align
- The color of the Item.public void setBackgroundColor(int color)
setBackgroundColor
in class View
color
- The background color of view.public void setMarquee(int marquee)
public void setHtml(String html)
html
- The html to be set.public void setBuilder(AlertDialog.Builder builder)
builder
- Builder for opening Alert Dialog.public void setColorAlertParams(CharSequence colortitle, CharSequence[] colornames, CharSequence[] colorints, CharSequence transparent)
colortitle
- Title for Alert Dialog.colornames
- List of name of selecting color.colorints
- List of int of color.public void setSizeAlertParams(CharSequence sizetitle, CharSequence[] sizenames, CharSequence[] sizedisplayints, CharSequence[] sizesendints)
sizetitle
- Title for Alert Dialog.sizenames
- List of name of selecting size.sizedisplayints
- List of int of size displayed in TextView.sizesendints
- List of int of size exported to HTML.public void setAlignAlertParams(CharSequence aligntitle, CharSequence[] alignnames)
public void setMarqueeAlertParams(CharSequence marqueetitle, CharSequence[] marqueenames)
public void setContextMenuStrings(CharSequence horizontalline, CharSequence clearstyles, CharSequence paste)
public boolean isEditting()
public boolean isStyledText()
public boolean isSoftKeyBlocked()
public int getEditMode()
public int getSelectState()
public String getHtml()
public String getHtml(boolean escapeFlag)
public String getHtml(ArrayList<Uri> uris, boolean escapeFlag)
uris
- The array of used uris.public String getPreviewHtml()
public int getBackgroundColor()
public com.android.ex.editstyledtext.EditStyledText.EditorManager getEditStyledTextManager()
public int getForegroundColor(int pos)
public void addAction(int mode, EditStyledText.EditModeActions.EditModeActionBase action)
public void addInputExtra(boolean create, String extra)