setText (CharSequence text)
Sets the string value of a TextView. whereas
setText (CharSequence text, TextView.BufferType type)
Sets the text displayed by this TextView, and also establishes whether it is stored in the buffer with the ability to erase / span and whether its editable is available.
All parameters of BufferType:
- TextView.BufferType.EDITABLE
- TextView.BufferType.NORMAL
- TextView.BufferType.SPANNABLE
eg.
myEditText.setText("This is new text from setText with BufferType EDITABLE.", TextView.BufferType.EDITABLE);
source
share