I want to implement a function,
EditText user when entering text, you can make changes in accordance with the set font size,
Such as Google Docs of Office,
Now I found a way to SpannableString
, but read some examples seem unable to reach my needs
int index = input.getSelectionEnd();
SpannableString spann = new SpannableString(show_input);
AbsoluteSizeSpan word_size = new AbsoluteSizeSpan(18,true);
spann.setSpan(word_size, 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
input.getText().insert(index, spann);
So is there any way to provide it?