what is difference between setText(CharSequence, TextView.BufferType)
and setText(CharSequence)
, and when we should use them?
setText (CharSequence text)
Sets the string value of the TextView. whereas
setText (CharSequence text, TextView.BufferType type)
Sets the text that this TextView is to display and also sets whether it is stored in a styleable/spannable buffer and whether it is editable.
All BufferType options are:
for e.g.
myEditText.setText("This is new text from setText with BufferType EDITABLE.", TextView.BufferType.EDITABLE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With