And how exactly you apply those changes? Inflate it each time is obviously too slow
u
ursus
06/13/2019, 6:26 AM
yes android edittext; no inflation, just mutation lf the same instance via edittext.textWatcher -- on every char + apply state.text back to edittext
g
gildor
06/13/2019, 6:28 AM
it should work relatively fast, but may cause problems with selections and cursor position, anyway I don’t think this related to this channel topic or to Kotlin in general
u
ursus
06/13/2019, 6:30 AM
well not sure whether its the edittect.setSelection(state.text.size) or the setText itself, but its unusable, not nicpicking, if you were to try it you'd see
d
david.bilik
06/13/2019, 7:05 AM
Each time I’ve implemented something like this I’ve added some checks to not set the text if it was the same as already presented in EditText .. in that time no cursor of other lags was not there .. but its not ideal, sure
u
ursus
06/13/2019, 7:14 AM
@david.bilik did you compare against previousState.text or if(newState.text != ediText.text.toString())?