Package org.robolectric.shadows
Class ShadowTextView
- java.lang.Object
-
- org.robolectric.shadows.ShadowView
-
- org.robolectric.shadows.ShadowTextView
-
- Direct Known Subclasses:
ShadowCompoundButton
@Implements(android.widget.TextView.class) public class ShadowTextView extends ShadowView
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowView
ShadowView.WindowIdHelper
-
-
Field Summary
Fields Modifier and Type Field Description protected intselectionEndprotected intselectionStart-
Fields inherited from class org.robolectric.shadows.ShadowView
attributeSet, realView, scrollToCoordinates
-
-
Constructor Summary
Constructors Constructor Description ShadowTextView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTextChangedListener(android.text.TextWatcher watcher)protected voiddumpAttributes(java.io.PrintStream out)intgetCompoundDrawablesWithIntrinsicBoundsBottom()intgetCompoundDrawablesWithIntrinsicBoundsLeft()intgetCompoundDrawablesWithIntrinsicBoundsRight()intgetCompoundDrawablesWithIntrinsicBoundsTop()android.widget.TextView.OnEditorActionListenergetOnEditorActionListener()protected intgetPaintFlags()intgetPreviousKeyCode(int index)android.view.KeyEventgetPreviousKeyEvent(int index)intgetTextAppearanceId()java.util.LocalegetTextServicesLocale()java.util.List<android.text.TextWatcher>getWatchers()java.lang.StringinnerText()Returns the text string of thisTextView.protected booleanonKeyDown(int keyCode, android.view.KeyEvent event)protected booleanonKeyUp(int keyCode, android.view.KeyEvent event)protected voidremoveTextChangedListener(android.text.TextWatcher watcher)protected voidsetCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom)protected voidsetOnEditorActionListener(android.widget.TextView.OnEditorActionListener l)protected voidsetPaintFlags(int paintFlags)protected voidsetTextAppearance(android.content.Context context, int resid)-
Methods inherited from class org.robolectric.shadows.ShadowView
__constructor__, addOnAttachStateChangeListener, callOnAttachedToWindow, callOnDetachedFromWindow, checkedPerformClick, clearWasInvalidated, clickOn, didRequestLayout, draw, dump, dump, dump, dumpAttribute, dumpFirstPart, dumpIndent, getGlobalVisibleRect, getLastTouchEvent, getLayerType, getOnAttachStateChangeListeners, getOnClickListener, getOnCreateContextMenuListener, getOnLongClickListener, getOnSystemUiVisibilityChangeListener, getOnTouchListener, getScrollX, getScrollY, getWindowDisplayFrame, getWindowId, getWindowVisibleDisplayFrame, innerText, invalidate, isAttachedToWindow, lastHapticFeedbackPerformed, onLayout, onLayoutWasCalled, onTouchEvent, performHapticFeedback, post, postDelayed, postInvalidateDelayed, removeCallbacks, removeOnAttachStateChangeListener, requestLayout, scrollBy, scrollTo, setAnimation, setDidRequestLayout, setGlobalVisibleRect, setLayerType, setMyParent, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setScrollX, setScrollY, setViewFocus, visualize, wasInvalidated
-
-
-
-
Method Detail
-
setTextAppearance
@Implementation protected void setTextAppearance(android.content.Context context, int resid)
-
onKeyDown
@Implementation protected boolean onKeyDown(int keyCode, android.view.KeyEvent event)
-
onKeyUp
@Implementation protected boolean onKeyUp(int keyCode, android.view.KeyEvent event)
-
getPreviousKeyCode
public int getPreviousKeyCode(int index)
-
getPreviousKeyEvent
public android.view.KeyEvent getPreviousKeyEvent(int index)
-
innerText
public java.lang.String innerText()
Returns the text string of thisTextView. Robolectric extension.- Overrides:
innerTextin classShadowView- Returns:
- String representation of this view.
-
getTextAppearanceId
public int getTextAppearanceId()
-
addTextChangedListener
@Implementation protected void addTextChangedListener(android.text.TextWatcher watcher)
-
removeTextChangedListener
@Implementation protected void removeTextChangedListener(android.text.TextWatcher watcher)
-
getWatchers
public java.util.List<android.text.TextWatcher> getWatchers()
- Returns:
- the list of currently registered watchers/listeners
-
getTextServicesLocale
@HiddenApi @Implementation public java.util.Locale getTextServicesLocale()
-
dumpAttributes
protected void dumpAttributes(java.io.PrintStream out)
- Overrides:
dumpAttributesin classShadowView
-
getPaintFlags
@Implementation protected int getPaintFlags()
-
setPaintFlags
@Implementation protected void setPaintFlags(int paintFlags)
-
setOnEditorActionListener
@Implementation protected void setOnEditorActionListener(android.widget.TextView.OnEditorActionListener l)
-
getOnEditorActionListener
public android.widget.TextView.OnEditorActionListener getOnEditorActionListener()
-
setCompoundDrawablesWithIntrinsicBounds
@Implementation protected void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom)
-
getCompoundDrawablesWithIntrinsicBoundsLeft
public int getCompoundDrawablesWithIntrinsicBoundsLeft()
-
getCompoundDrawablesWithIntrinsicBoundsTop
public int getCompoundDrawablesWithIntrinsicBoundsTop()
-
getCompoundDrawablesWithIntrinsicBoundsRight
public int getCompoundDrawablesWithIntrinsicBoundsRight()
-
getCompoundDrawablesWithIntrinsicBoundsBottom
public int getCompoundDrawablesWithIntrinsicBoundsBottom()
-
-