Android EditText cannot process large file

I noticed that if most of the text inside the EditText View is colored with a different color (for example, ForegroundColorSpan), the EditText becomes very slow when the number of lines is large. (> 500 lines)

I am trying to use EditText to enter code and select syntax using a Spannable object.

Anyone have a solution to this problem? Do I need to write my own EditText view? If so, how to do it?

+4
source share
1 answer

there has never been this problem, but have you tried to temporarily turn off the color while editing and return the color after editing? also, is it possible to use listview for editTexts?

0
source

All Articles