TextView

Class of android.widget · TextView.java · Android's reference

public class TextView extends View

TextView ← View

A view of text: one StaticLayout of it, with compound drawables around it.

Nested types

Extended in the framework by

Page 1 2 3 4 5

Members

public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0 source
public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1 source
public TextView(Context context) source
public TextView(Context context, AttributeSet attrs) source
public TextView(Context context, AttributeSet attrs, int defStyleAttr) source
public TextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source

Text

public void setText(CharSequence text) source
public final void setTextKeepState(CharSequence text) source

setText that keeps the selection, cut to the new text's length

public final void setTextKeepState(CharSequence text, BufferType type) source
public final void setShowSoftInputOnFocus(boolean show) source
public final boolean getShowSoftInputOnFocus() source
public void setText(CharSequence text, BufferType type) source
public final void setText(char[] text, int start, int len) source
public final void setText(int resid) source
public final void setText(int resid, BufferType type) source
public CharSequence getText() source
public int length() source
public Editable getEditableText() source
protected boolean getDefaultEditable() source
public final void setEditableFactory(Editable.Factory factory) source
public final void setSpannableFactory(Spannable.Factory factory) source
public void setTextAlignment(int textAlignment) source
public final void setHint(CharSequence hint) source
public final void setHint(int resid) source
public CharSequence getHint() source

Text watchers

public void addTextChangedListener(TextWatcher watcher) source
public void removeTextChangedListener(TextWatcher watcher) source
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) empty body source
public void beginBatchEdit() source
public void endBatchEdit() source

Selection

public int getSelectionStart() source
public int getSelectionEnd() source
public boolean hasSelection() source
public boolean onTextContextMenuItem(int id) source
public void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback) source
public ActionMode.Callback getCustomSelectionActionModeCallback() source
public void setHighlightColor(int color) source
public int getHighlightColor() source
public void setTextClassifier(TextClassifier textClassifier) source
public TextClassifier getTextClassifier() source

Input

public void setInputType(int type) source
public void setRawInputType(int type) source
public int getInputType() source
public void setImeOptions(int imeOptions) source
public int getImeOptions() source

Page 1 2 3 4 5


Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.