|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.view.View
android.widget.TextView
android.widget.EditText
com.hipipal.texteditor.ui.view.AdvancedEditText
public class AdvancedEditText
TODO create a syntax highlighter
Nested Class Summary | |
---|---|
static interface |
AdvancedEditText.OnTextChangedListener
|
Nested classes/interfaces inherited from class android.widget.TextView |
---|
android.widget.TextView.BufferType, android.widget.TextView.OnEditorActionListener, android.widget.TextView.SavedState |
Nested classes/interfaces inherited from class android.view.View |
---|
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener |
Field Summary | |
---|---|
boolean |
dirty
|
int |
errorLine
|
AdvancedEditText.OnTextChangedListener |
onTextChangedListener
|
int |
updateDelay
|
Fields inherited from class android.view.View |
---|
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, 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, 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, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, 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_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, 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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y |
Constructor Summary | |
---|---|
AdvancedEditText(android.content.Context context,
android.util.AttributeSet attrs)
|
Method Summary | |
---|---|
void |
computeScroll()
|
java.lang.String |
getCleanText()
|
boolean |
onDown(android.view.MotionEvent e)
|
void |
onDraw(android.graphics.Canvas canvas)
|
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY)
|
boolean |
onKey(android.view.View v,
int keyCode,
android.view.KeyEvent event)
|
void |
onLongPress(android.view.MotionEvent e)
|
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY)
|
void |
onShowPress(android.view.MotionEvent e)
|
boolean |
onSingleTapUp(android.view.MotionEvent e)
|
boolean |
onTouchEvent(android.view.MotionEvent event)
|
void |
refresh()
|
void |
setFileType(java.lang.String ft)
|
void |
setTextHighlighted(java.lang.CharSequence text)
|
void |
unHightlight()
|
void |
unHightWithoutChange(android.text.Editable e)
|
void |
updateFromSettings(java.lang.String fileType)
Update view settings from the app preferences |
Methods inherited from class android.widget.EditText |
---|
extendSelection, getText, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, selectAll, setEllipsize, setSelection, setSelection, setText |
Methods inherited from class android.widget.TextView |
---|
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, debug, didTouchFocusSelect, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getBaseline, getCompoundDrawablePadding, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFocusedRect, getFreezesText, getGravity, getHighlightColor, getHint, getHintTextColors, getImeActionId, getImeActionLabel, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getKeyListener, getLayout, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinksClickable, getLinkTextColors, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getTextColor, getTextColors, getTextColors, getTextLocale, getTextScaleX, getTextSize, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, invalidateDrawable, isCursorVisible, isInputMethodTarget, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCommitCorrection, onCreateInputConnection, onDragEvent, onEditorAction, onEndBatchEdit, onFinishTemporaryDetach, onGenericMotionEvent, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onPreDraw, onPrivateIMECommand, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onStartTemporaryDetach, onTextContextMenuItem, onTrackballEvent, onWindowFocusChanged, performAccessibilityAction, performLongClick, removeTextChangedListener, sendAccessibilityEvent, setAllCaps, setAutoLinkMask, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCursorVisible, setCustomSelectionActionModeCallback, setEditableFactory, setEms, setEnabled, setError, setError, setExtractedText, setFilters, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setImeActionLabel, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, 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, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setTextAppearance, setTextColor, setTextColor, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth |
Methods inherited from class android.view.View |
---|
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCancelPendingInputEvents, onFilterTouchEventForSecurity, onHoverChanged, onHoverEvent, onKeyLongPress, onWindowSystemUiVisibilityChanged, performClick, performHapticFeedback, performHapticFeedback, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public AdvancedEditText.OnTextChangedListener onTextChangedListener
public int updateDelay
public int errorLine
public boolean dirty
Constructor Detail |
---|
public AdvancedEditText(android.content.Context context, android.util.AttributeSet attrs)
context
- the current contextattrs
- some attributesMethod Detail |
---|
public void setFileType(java.lang.String ft)
public void computeScroll()
computeScroll
in class android.widget.TextView
TextView.computeScroll()
public void onDraw(android.graphics.Canvas canvas)
onDraw
in class android.widget.TextView
TextView.onDraw(Canvas)
public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event)
onKey
in interface android.view.View.OnKeyListener
View.OnKeyListener.onKey(android.view.View, int,
android.view.KeyEvent)
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class android.widget.TextView
TextView.onTouchEvent(android.view.MotionEvent)
public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onDown(android.view.MotionEvent)
public boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onSingleTapUp(android.view.MotionEvent)
public void onShowPress(android.view.MotionEvent e)
onShowPress
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onShowPress(android.view.MotionEvent)
public void onLongPress(android.view.MotionEvent e)
onLongPress
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onLongPress(android.view.MotionEvent)
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onScroll(android.view.MotionEvent,
android.view.MotionEvent, float, float)
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
onFling
in interface android.view.GestureDetector.OnGestureListener
GestureDetector.OnGestureListener.onFling(android.view.MotionEvent,
android.view.MotionEvent, float, float)
public void updateFromSettings(java.lang.String fileType)
public void setTextHighlighted(java.lang.CharSequence text)
public java.lang.String getCleanText()
public void refresh()
public void unHightlight()
public void unHightWithoutChange(android.text.Editable e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |