android.widget
Class TextView
java.lang.Object
android.view.View
android.widget.TextView
- All Implemented Interfaces:
- Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewTreeObserver.OnPreDrawListener
- Direct Known Subclasses:
- Button, CheckedTextView, Chronometer, DigitalClock, EditText
public class TextView
- extends View
- implements ViewTreeObserver.OnPreDrawListener
Nested classes/interfaces inherited from class android.view.View |
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnAttachStateChangeListener, View.OnClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener |
Fields inherited from class android.view.View |
ALPHA, 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_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, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, 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, 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_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, 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, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y |
Method Summary |
void |
addTextChangedListener(TextWatcher watcher)
|
void |
append(CharSequence text)
|
void |
append(CharSequence text,
int start,
int end)
|
void |
beginBatchEdit()
|
boolean |
bringPointIntoView(int offset)
|
void |
cancelLongPress()
|
void |
clearComposingText()
|
protected int |
computeHorizontalScrollRange()
|
void |
computeScroll()
|
protected int |
computeVerticalScrollExtent()
|
protected int |
computeVerticalScrollRange()
|
void |
debug(int depth)
|
boolean |
didTouchFocusSelect()
|
protected void |
drawableStateChanged()
|
void |
endBatchEdit()
|
boolean |
extractText(ExtractedTextRequest request,
ExtractedText outText)
|
void |
findViewsWithText(ArrayList<View> outViews,
CharSequence searched,
int flags)
|
int |
getAutoLinkMask()
|
int |
getBaseline()
|
protected int |
getBottomPaddingOffset()
|
int |
getCompoundDrawablePadding()
|
Drawable[] |
getCompoundDrawables()
|
int |
getCompoundPaddingBottom()
|
int |
getCompoundPaddingLeft()
|
int |
getCompoundPaddingRight()
|
int |
getCompoundPaddingTop()
|
int |
getCurrentHintTextColor()
|
int |
getCurrentTextColor()
|
ActionMode.Callback |
getCustomSelectionActionModeCallback()
|
protected boolean |
getDefaultEditable()
|
protected MovementMethod |
getDefaultMovementMethod()
|
Editable |
getEditableText()
|
TextUtils.TruncateAt |
getEllipsize()
|
CharSequence |
getError()
|
int |
getExtendedPaddingBottom()
|
int |
getExtendedPaddingTop()
|
InputFilter[] |
getFilters()
|
void |
getFocusedRect(Rect r)
|
boolean |
getFreezesText()
|
int |
getGravity()
|
CharSequence |
getHint()
|
ColorStateList |
getHintTextColors()
|
int |
getImeActionId()
|
CharSequence |
getImeActionLabel()
|
int |
getImeOptions()
|
Bundle |
getInputExtras(boolean create)
|
int |
getInputType()
|
KeyListener |
getKeyListener()
|
Layout |
getLayout()
|
protected float |
getLeftFadingEdgeStrength()
|
protected int |
getLeftPaddingOffset()
|
int |
getLineBounds(int line,
Rect bounds)
|
int |
getLineCount()
|
int |
getLineHeight()
|
boolean |
getLinksClickable()
|
ColorStateList |
getLinkTextColors()
|
MovementMethod |
getMovementMethod()
|
int |
getOffsetForPosition(float x,
float y)
|
TextPaint |
getPaint()
|
int |
getPaintFlags()
|
String |
getPrivateImeOptions()
|
protected float |
getRightFadingEdgeStrength()
|
protected int |
getRightPaddingOffset()
|
int |
getSelectionEnd()
|
int |
getSelectionStart()
|
CharSequence |
getText()
|
static int |
getTextColor(Context context,
TypedArray attrs,
int def)
|
ColorStateList |
getTextColors()
|
static ColorStateList |
getTextColors(Context context,
TypedArray attrs)
|
float |
getTextScaleX()
|
float |
getTextSize()
|
protected int |
getTopPaddingOffset()
|
int |
getTotalPaddingBottom()
|
int |
getTotalPaddingLeft()
|
int |
getTotalPaddingRight()
|
int |
getTotalPaddingTop()
|
TransformationMethod |
getTransformationMethod()
|
Typeface |
getTypeface()
|
URLSpan[] |
getUrls()
|
boolean |
hasSelection()
|
void |
invalidateDrawable(Drawable drawable)
|
boolean |
isInputMethodTarget()
|
protected boolean |
isPaddingOffsetRequired()
|
boolean |
isSuggestionsEnabled()
|
boolean |
isTextSelectable()
|
void |
jumpDrawablesToCurrentState()
|
int |
length()
|
boolean |
moveCursorToVisibleOffset()
|
protected void |
onAttachedToWindow()
|
void |
onBeginBatchEdit()
|
boolean |
onCheckIsTextEditor()
|
void |
onCommitCompletion(CompletionInfo text)
|
void |
onCommitCorrection(CorrectionInfo info)
|
protected void |
onCreateContextMenu(ContextMenu menu)
|
protected int[] |
onCreateDrawableState(int extraSpace)
|
InputConnection |
onCreateInputConnection(EditorInfo outAttrs)
|
protected void |
onDetachedFromWindow()
|
boolean |
onDragEvent(DragEvent event)
|
protected void |
onDraw(Canvas canvas)
|
void |
onEditorAction(int actionCode)
|
void |
onEndBatchEdit()
|
void |
onFinishTemporaryDetach()
|
protected void |
onFocusChanged(boolean focused,
int direction,
Rect previouslyFocusedRect)
|
boolean |
onGenericMotionEvent(MotionEvent event)
|
void |
onInitializeAccessibilityEvent(AccessibilityEvent event)
|
void |
onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
|
boolean |
onKeyDown(int keyCode,
KeyEvent event)
|
boolean |
onKeyMultiple(int keyCode,
int repeatCount,
KeyEvent event)
|
boolean |
onKeyPreIme(int keyCode,
KeyEvent event)
|
boolean |
onKeyShortcut(int keyCode,
KeyEvent event)
|
boolean |
onKeyUp(int keyCode,
KeyEvent event)
|
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
void |
onPopulateAccessibilityEvent(AccessibilityEvent event)
|
boolean |
onPreDraw()
|
boolean |
onPrivateIMECommand(String action,
Bundle data)
|
void |
onRestoreInstanceState(Parcelable state)
|
Parcelable |
onSaveInstanceState()
|
protected void |
onScrollChanged(int horiz,
int vert,
int oldHoriz,
int oldVert)
|
protected void |
onSelectionChanged(int selStart,
int selEnd)
|
protected boolean |
onSetAlpha(int alpha)
|
void |
onStartTemporaryDetach()
|
protected void |
onTextChanged(CharSequence text,
int start,
int lengthBefore,
int lengthAfter)
|
boolean |
onTextContextMenuItem(int id)
|
boolean |
onTouchEvent(MotionEvent event)
|
boolean |
onTrackballEvent(MotionEvent event)
|
protected void |
onVisibilityChanged(View changedView,
int visibility)
|
void |
onWindowFocusChanged(boolean hasWindowFocus)
|
boolean |
performLongClick()
|
void |
removeTextChangedListener(TextWatcher watcher)
|
protected void |
resetResolvedDrawables()
|
protected void |
resetResolvedLayoutDirection()
|
protected void |
resolveDrawables()
|
protected void |
resolveTextDirection()
|
void |
sendAccessibilityEvent(int eventType)
|
void |
setAllCaps(boolean allCaps)
|
void |
setAutoLinkMask(int mask)
|
void |
setCompoundDrawablePadding(int pad)
|
void |
setCompoundDrawables(Drawable left,
Drawable top,
Drawable right,
Drawable bottom)
|
void |
setCompoundDrawablesWithIntrinsicBounds(Drawable left,
Drawable top,
Drawable right,
Drawable bottom)
|
void |
setCompoundDrawablesWithIntrinsicBounds(int left,
int top,
int right,
int bottom)
|
void |
setCursorVisible(boolean visible)
|
void |
setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback)
|
void |
setEditableFactory(Editable.Factory factory)
|
void |
setEllipsize(TextUtils.TruncateAt where)
|
void |
setEms(int ems)
|
void |
setEnabled(boolean enabled)
|
void |
setError(CharSequence error)
|
void |
setError(CharSequence error,
Drawable icon)
|
void |
setExtractedText(ExtractedText text)
|
void |
setFilters(InputFilter[] filters)
|
protected boolean |
setFrame(int l,
int t,
int r,
int b)
|
void |
setFreezesText(boolean freezesText)
|
void |
setGravity(int gravity)
|
void |
setHeight(int pixels)
|
void |
setHighlightColor(int color)
|
void |
setHint(CharSequence hint)
|
void |
setHint(int resid)
|
void |
setHintTextColor(ColorStateList colors)
|
void |
setHintTextColor(int color)
|
void |
setHorizontallyScrolling(boolean whether)
|
void |
setImeActionLabel(CharSequence label,
int actionId)
|
void |
setImeOptions(int imeOptions)
|
void |
setIncludeFontPadding(boolean includepad)
|
void |
setInputExtras(int xmlResId)
|
void |
setInputType(int type)
|
void |
setKeyListener(KeyListener input)
|
void |
setLines(int lines)
|
void |
setLineSpacing(float add,
float mult)
|
void |
setLinksClickable(boolean whether)
|
void |
setLinkTextColor(ColorStateList colors)
|
void |
setLinkTextColor(int color)
|
void |
setMarqueeRepeatLimit(int marqueeLimit)
|
void |
setMaxEms(int maxems)
|
void |
setMaxHeight(int maxHeight)
|
void |
setMaxLines(int maxlines)
|
void |
setMaxWidth(int maxpixels)
|
void |
setMinEms(int minems)
|
void |
setMinHeight(int minHeight)
|
void |
setMinLines(int minlines)
|
void |
setMinWidth(int minpixels)
|
void |
setMovementMethod(MovementMethod movement)
|
void |
setOnEditorActionListener(TextView.OnEditorActionListener l)
|
void |
setPadding(int left,
int top,
int right,
int bottom)
|
void |
setPaintFlags(int flags)
|
void |
setPrivateImeOptions(String type)
|
void |
setRawInputType(int type)
|
void |
setScroller(Scroller s)
|
void |
setSelectAllOnFocus(boolean selectAllOnFocus)
|
void |
setSelected(boolean selected)
|
void |
setShadowLayer(float radius,
float dx,
float dy,
int color)
|
void |
setSingleLine()
|
void |
setSingleLine(boolean singleLine)
|
void |
setSpannableFactory(Spannable.Factory factory)
|
void |
setText(char[] text,
int start,
int len)
|
void |
setText(CharSequence text)
|
void |
setText(CharSequence text,
TextView.BufferType type)
|
void |
setText(int resid)
|
void |
setText(int resid,
TextView.BufferType type)
|
void |
setTextAppearance(Context context,
int resid)
|
void |
setTextColor(ColorStateList colors)
|
void |
setTextColor(int color)
|
void |
setTextIsSelectable(boolean selectable)
|
void |
setTextKeepState(CharSequence text)
|
void |
setTextKeepState(CharSequence text,
TextView.BufferType type)
|
void |
setTextScaleX(float size)
|
void |
setTextSize(float size)
|
void |
setTextSize(int unit,
float size)
|
void |
setTransformationMethod(TransformationMethod method)
|
void |
setTypeface(Typeface tf)
|
void |
setTypeface(Typeface tf,
int style)
|
void |
setWidth(int pixels)
|
protected boolean |
verifyDrawable(Drawable who)
|
Methods inherited from class android.view.View |
addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitsSystemWindows, fitSystemWindows, focusSearch, forceLayout, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFocusables, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onConfigurationChanged, onDisplayHint, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onHoverChanged, onHoverEvent, onKeyLongPress, onLayout, onOverScrolled, onSizeChanged, onWindowVisibilityChanged, overScrollBy, performClick, performHapticFeedback, performHapticFeedback, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setActivated, setAlpha, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, 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, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextView
public TextView(Context context)
TextView
public TextView(Context context,
AttributeSet attrs)
TextView
public TextView(Context context,
AttributeSet attrs,
int defStyle)
setEnabled
public void setEnabled(boolean enabled)
- Overrides:
setEnabled
in class View
setTypeface
public void setTypeface(Typeface tf,
int style)
getDefaultEditable
protected boolean getDefaultEditable()
getDefaultMovementMethod
protected MovementMethod getDefaultMovementMethod()
getText
public CharSequence getText()
length
public int length()
getEditableText
public Editable getEditableText()
getLineHeight
public int getLineHeight()
getLayout
public final Layout getLayout()
getKeyListener
public final KeyListener getKeyListener()
setKeyListener
public void setKeyListener(KeyListener input)
getMovementMethod
public final MovementMethod getMovementMethod()
setMovementMethod
public final void setMovementMethod(MovementMethod movement)
getTransformationMethod
public final TransformationMethod getTransformationMethod()
setTransformationMethod
public final void setTransformationMethod(TransformationMethod method)
getCompoundPaddingTop
public int getCompoundPaddingTop()
getCompoundPaddingBottom
public int getCompoundPaddingBottom()
getCompoundPaddingLeft
public int getCompoundPaddingLeft()
getCompoundPaddingRight
public int getCompoundPaddingRight()
getExtendedPaddingTop
public int getExtendedPaddingTop()
getExtendedPaddingBottom
public int getExtendedPaddingBottom()
getTotalPaddingLeft
public int getTotalPaddingLeft()
getTotalPaddingRight
public int getTotalPaddingRight()
getTotalPaddingTop
public int getTotalPaddingTop()
getTotalPaddingBottom
public int getTotalPaddingBottom()
setCompoundDrawables
public void setCompoundDrawables(Drawable left,
Drawable top,
Drawable right,
Drawable bottom)
setCompoundDrawablesWithIntrinsicBounds
public void setCompoundDrawablesWithIntrinsicBounds(int left,
int top,
int right,
int bottom)
setCompoundDrawablesWithIntrinsicBounds
public void setCompoundDrawablesWithIntrinsicBounds(Drawable left,
Drawable top,
Drawable right,
Drawable bottom)
getCompoundDrawables
public Drawable[] getCompoundDrawables()
setCompoundDrawablePadding
public void setCompoundDrawablePadding(int pad)
getCompoundDrawablePadding
public int getCompoundDrawablePadding()
setPadding
public void setPadding(int left,
int top,
int right,
int bottom)
- Overrides:
setPadding
in class View
getAutoLinkMask
public final int getAutoLinkMask()
setTextAppearance
public void setTextAppearance(Context context,
int resid)
getTextSize
public float getTextSize()
setTextSize
public void setTextSize(float size)
setTextSize
public void setTextSize(int unit,
float size)
getTextScaleX
public float getTextScaleX()
setTextScaleX
public void setTextScaleX(float size)
setTypeface
public void setTypeface(Typeface tf)
getTypeface
public Typeface getTypeface()
setTextColor
public void setTextColor(int color)
setTextColor
public void setTextColor(ColorStateList colors)
getTextColors
public final ColorStateList getTextColors()
getCurrentTextColor
public final int getCurrentTextColor()
setHighlightColor
public void setHighlightColor(int color)
setShadowLayer
public void setShadowLayer(float radius,
float dx,
float dy,
int color)
getPaint
public TextPaint getPaint()
setAutoLinkMask
public final void setAutoLinkMask(int mask)
setLinksClickable
public final void setLinksClickable(boolean whether)
getLinksClickable
public final boolean getLinksClickable()
getUrls
public URLSpan[] getUrls()
setHintTextColor
public final void setHintTextColor(int color)
setHintTextColor
public final void setHintTextColor(ColorStateList colors)
getHintTextColors
public final ColorStateList getHintTextColors()
getCurrentHintTextColor
public final int getCurrentHintTextColor()
setLinkTextColor
public final void setLinkTextColor(int color)
setLinkTextColor
public final void setLinkTextColor(ColorStateList colors)
getLinkTextColors
public final ColorStateList getLinkTextColors()
setGravity
public void setGravity(int gravity)
getGravity
public int getGravity()
getPaintFlags
public int getPaintFlags()
setPaintFlags
public void setPaintFlags(int flags)
setHorizontallyScrolling
public void setHorizontallyScrolling(boolean whether)
setMinLines
public void setMinLines(int minlines)
setMinHeight
public void setMinHeight(int minHeight)
setMaxLines
public void setMaxLines(int maxlines)
setMaxHeight
public void setMaxHeight(int maxHeight)
setLines
public void setLines(int lines)
setHeight
public void setHeight(int pixels)
setMinEms
public void setMinEms(int minems)
setMinWidth
public void setMinWidth(int minpixels)
setMaxEms
public void setMaxEms(int maxems)
setMaxWidth
public void setMaxWidth(int maxpixels)
setEms
public void setEms(int ems)
setWidth
public void setWidth(int pixels)
setLineSpacing
public void setLineSpacing(float add,
float mult)
append
public final void append(CharSequence text)
append
public void append(CharSequence text,
int start,
int end)
drawableStateChanged
protected void drawableStateChanged()
- Overrides:
drawableStateChanged
in class View
onSaveInstanceState
public Parcelable onSaveInstanceState()
- Overrides:
onSaveInstanceState
in class View
onRestoreInstanceState
public void onRestoreInstanceState(Parcelable state)
- Overrides:
onRestoreInstanceState
in class View
setFreezesText
public void setFreezesText(boolean freezesText)
getFreezesText
public boolean getFreezesText()
setEditableFactory
public final void setEditableFactory(Editable.Factory factory)
setSpannableFactory
public final void setSpannableFactory(Spannable.Factory factory)
setText
public final void setText(CharSequence text)
setTextKeepState
public final void setTextKeepState(CharSequence text)
setText
public void setText(CharSequence text,
TextView.BufferType type)
setText
public final void setText(char[] text,
int start,
int len)
setTextKeepState
public final void setTextKeepState(CharSequence text,
TextView.BufferType type)
setText
public final void setText(int resid)
setText
public final void setText(int resid,
TextView.BufferType type)
setHint
public final void setHint(CharSequence hint)
setHint
public final void setHint(int resid)
getHint
public CharSequence getHint()
setInputType
public void setInputType(int type)
setRawInputType
public void setRawInputType(int type)
getInputType
public int getInputType()
setImeOptions
public void setImeOptions(int imeOptions)
getImeOptions
public int getImeOptions()
setImeActionLabel
public void setImeActionLabel(CharSequence label,
int actionId)
getImeActionLabel
public CharSequence getImeActionLabel()
getImeActionId
public int getImeActionId()
setOnEditorActionListener
public void setOnEditorActionListener(TextView.OnEditorActionListener l)
onEditorAction
public void onEditorAction(int actionCode)
setPrivateImeOptions
public void setPrivateImeOptions(String type)
getPrivateImeOptions
public String getPrivateImeOptions()
setInputExtras
public void setInputExtras(int xmlResId)
throws org.xmlpull.v1.XmlPullParserException,
IOException
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
getInputExtras
public Bundle getInputExtras(boolean create)
getError
public CharSequence getError()
setError
public void setError(CharSequence error)
setError
public void setError(CharSequence error,
Drawable icon)
setFrame
protected boolean setFrame(int l,
int t,
int r,
int b)
setFilters
public void setFilters(InputFilter[] filters)
getFilters
public InputFilter[] getFilters()
onPreDraw
public boolean onPreDraw()
- Specified by:
onPreDraw
in interface ViewTreeObserver.OnPreDrawListener
onAttachedToWindow
protected void onAttachedToWindow()
- Overrides:
onAttachedToWindow
in class View
onDetachedFromWindow
protected void onDetachedFromWindow()
- Overrides:
onDetachedFromWindow
in class View
isPaddingOffsetRequired
protected boolean isPaddingOffsetRequired()
- Overrides:
isPaddingOffsetRequired
in class View
getLeftPaddingOffset
protected int getLeftPaddingOffset()
- Overrides:
getLeftPaddingOffset
in class View
getTopPaddingOffset
protected int getTopPaddingOffset()
- Overrides:
getTopPaddingOffset
in class View
getBottomPaddingOffset
protected int getBottomPaddingOffset()
- Overrides:
getBottomPaddingOffset
in class View
getRightPaddingOffset
protected int getRightPaddingOffset()
- Overrides:
getRightPaddingOffset
in class View
verifyDrawable
protected boolean verifyDrawable(Drawable who)
- Overrides:
verifyDrawable
in class View
jumpDrawablesToCurrentState
public void jumpDrawablesToCurrentState()
- Overrides:
jumpDrawablesToCurrentState
in class View
invalidateDrawable
public void invalidateDrawable(Drawable drawable)
- Specified by:
invalidateDrawable
in interface Drawable.Callback
- Overrides:
invalidateDrawable
in class View
onSetAlpha
protected boolean onSetAlpha(int alpha)
- Overrides:
onSetAlpha
in class View
isTextSelectable
public boolean isTextSelectable()
setTextIsSelectable
public void setTextIsSelectable(boolean selectable)
onCreateDrawableState
protected int[] onCreateDrawableState(int extraSpace)
- Overrides:
onCreateDrawableState
in class View
onDraw
protected void onDraw(Canvas canvas)
- Overrides:
onDraw
in class View
getFocusedRect
public void getFocusedRect(Rect r)
- Overrides:
getFocusedRect
in class View
getLineCount
public int getLineCount()
getLineBounds
public int getLineBounds(int line,
Rect bounds)
getBaseline
public int getBaseline()
- Overrides:
getBaseline
in class View
onKeyPreIme
public boolean onKeyPreIme(int keyCode,
KeyEvent event)
- Overrides:
onKeyPreIme
in class View
onKeyDown
public boolean onKeyDown(int keyCode,
KeyEvent event)
- Specified by:
onKeyDown
in interface KeyEvent.Callback
- Overrides:
onKeyDown
in class View
onKeyMultiple
public boolean onKeyMultiple(int keyCode,
int repeatCount,
KeyEvent event)
- Specified by:
onKeyMultiple
in interface KeyEvent.Callback
- Overrides:
onKeyMultiple
in class View
onKeyUp
public boolean onKeyUp(int keyCode,
KeyEvent event)
- Specified by:
onKeyUp
in interface KeyEvent.Callback
- Overrides:
onKeyUp
in class View
onCheckIsTextEditor
public boolean onCheckIsTextEditor()
- Overrides:
onCheckIsTextEditor
in class View
onCreateInputConnection
public InputConnection onCreateInputConnection(EditorInfo outAttrs)
- Overrides:
onCreateInputConnection
in class View
extractText
public boolean extractText(ExtractedTextRequest request,
ExtractedText outText)
setExtractedText
public void setExtractedText(ExtractedText text)
onCommitCompletion
public void onCommitCompletion(CompletionInfo text)
onCommitCorrection
public void onCommitCorrection(CorrectionInfo info)
beginBatchEdit
public void beginBatchEdit()
endBatchEdit
public void endBatchEdit()
onBeginBatchEdit
public void onBeginBatchEdit()
onEndBatchEdit
public void onEndBatchEdit()
onPrivateIMECommand
public boolean onPrivateIMECommand(String action,
Bundle data)
resetResolvedLayoutDirection
protected void resetResolvedLayoutDirection()
setIncludeFontPadding
public void setIncludeFontPadding(boolean includepad)
onMeasure
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
- Overrides:
onMeasure
in class View
bringPointIntoView
public boolean bringPointIntoView(int offset)
moveCursorToVisibleOffset
public boolean moveCursorToVisibleOffset()
computeScroll
public void computeScroll()
- Overrides:
computeScroll
in class View
debug
public void debug(int depth)
getSelectionStart
public int getSelectionStart()
getSelectionEnd
public int getSelectionEnd()
hasSelection
public boolean hasSelection()
setSingleLine
public void setSingleLine()
setAllCaps
public void setAllCaps(boolean allCaps)
setSingleLine
public void setSingleLine(boolean singleLine)
setEllipsize
public void setEllipsize(TextUtils.TruncateAt where)
setMarqueeRepeatLimit
public void setMarqueeRepeatLimit(int marqueeLimit)
getEllipsize
public TextUtils.TruncateAt getEllipsize()
setSelectAllOnFocus
public void setSelectAllOnFocus(boolean selectAllOnFocus)
setCursorVisible
public void setCursorVisible(boolean visible)
onTextChanged
protected void onTextChanged(CharSequence text,
int start,
int lengthBefore,
int lengthAfter)
onSelectionChanged
protected void onSelectionChanged(int selStart,
int selEnd)
addTextChangedListener
public void addTextChangedListener(TextWatcher watcher)
removeTextChangedListener
public void removeTextChangedListener(TextWatcher watcher)
onStartTemporaryDetach
public void onStartTemporaryDetach()
- Overrides:
onStartTemporaryDetach
in class View
onFinishTemporaryDetach
public void onFinishTemporaryDetach()
- Overrides:
onFinishTemporaryDetach
in class View
onFocusChanged
protected void onFocusChanged(boolean focused,
int direction,
Rect previouslyFocusedRect)
- Overrides:
onFocusChanged
in class View
onWindowFocusChanged
public void onWindowFocusChanged(boolean hasWindowFocus)
- Overrides:
onWindowFocusChanged
in class View
onVisibilityChanged
protected void onVisibilityChanged(View changedView,
int visibility)
- Overrides:
onVisibilityChanged
in class View
clearComposingText
public void clearComposingText()
setSelected
public void setSelected(boolean selected)
- Overrides:
setSelected
in class View
onTouchEvent
public boolean onTouchEvent(MotionEvent event)
- Overrides:
onTouchEvent
in class View
onGenericMotionEvent
public boolean onGenericMotionEvent(MotionEvent event)
- Overrides:
onGenericMotionEvent
in class View
didTouchFocusSelect
public boolean didTouchFocusSelect()
cancelLongPress
public void cancelLongPress()
- Overrides:
cancelLongPress
in class View
onTrackballEvent
public boolean onTrackballEvent(MotionEvent event)
- Overrides:
onTrackballEvent
in class View
setScroller
public void setScroller(Scroller s)
getLeftFadingEdgeStrength
protected float getLeftFadingEdgeStrength()
- Overrides:
getLeftFadingEdgeStrength
in class View
getRightFadingEdgeStrength
protected float getRightFadingEdgeStrength()
- Overrides:
getRightFadingEdgeStrength
in class View
computeHorizontalScrollRange
protected int computeHorizontalScrollRange()
- Overrides:
computeHorizontalScrollRange
in class View
computeVerticalScrollRange
protected int computeVerticalScrollRange()
- Overrides:
computeVerticalScrollRange
in class View
computeVerticalScrollExtent
protected int computeVerticalScrollExtent()
- Overrides:
computeVerticalScrollExtent
in class View
findViewsWithText
public void findViewsWithText(ArrayList<View> outViews,
CharSequence searched,
int flags)
- Overrides:
findViewsWithText
in class View
getTextColors
public static ColorStateList getTextColors(Context context,
TypedArray attrs)
getTextColor
public static int getTextColor(Context context,
TypedArray attrs,
int def)
onKeyShortcut
public boolean onKeyShortcut(int keyCode,
KeyEvent event)
- Overrides:
onKeyShortcut
in class View
onPopulateAccessibilityEvent
public void onPopulateAccessibilityEvent(AccessibilityEvent event)
- Overrides:
onPopulateAccessibilityEvent
in class View
onInitializeAccessibilityEvent
public void onInitializeAccessibilityEvent(AccessibilityEvent event)
- Overrides:
onInitializeAccessibilityEvent
in class View
onInitializeAccessibilityNodeInfo
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
- Overrides:
onInitializeAccessibilityNodeInfo
in class View
sendAccessibilityEvent
public void sendAccessibilityEvent(int eventType)
- Specified by:
sendAccessibilityEvent
in interface AccessibilityEventSource
- Overrides:
sendAccessibilityEvent
in class View
onCreateContextMenu
protected void onCreateContextMenu(ContextMenu menu)
- Overrides:
onCreateContextMenu
in class View
isInputMethodTarget
public boolean isInputMethodTarget()
onTextContextMenuItem
public boolean onTextContextMenuItem(int id)
performLongClick
public boolean performLongClick()
- Overrides:
performLongClick
in class View
onScrollChanged
protected void onScrollChanged(int horiz,
int vert,
int oldHoriz,
int oldVert)
- Overrides:
onScrollChanged
in class View
isSuggestionsEnabled
public boolean isSuggestionsEnabled()
setCustomSelectionActionModeCallback
public void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback)
getCustomSelectionActionModeCallback
public ActionMode.Callback getCustomSelectionActionModeCallback()
getOffsetForPosition
public int getOffsetForPosition(float x,
float y)
onDragEvent
public boolean onDragEvent(DragEvent event)
- Overrides:
onDragEvent
in class View
resolveTextDirection
protected void resolveTextDirection()
resolveDrawables
protected void resolveDrawables()
resetResolvedDrawables
protected void resetResolvedDrawables()
Copyright © 2008-2012. All Rights Reserved.