File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
highLightText/src/main/java/org/evilbinary/highliter Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,23 @@ public void setHtml(String htmlSource) {
143143 }
144144 }
145145
146- public void setSource (String source ) {
146+ public void setSource (final String source ) {
147147 if (source != null ) {
148148 setText (source );
149- String result = mMaker .pase (source );
150- Spanned spanText = mConverter .convert (result );
151- render (spanText , 0 );
149+ new Thread () {
150+ @ Override
151+ public void run () {
152+ super .run ();
153+ String result = mMaker .pase (source );
154+ final Spanned spanText = mConverter .convert (result );
155+ post (new Runnable () {
156+ @ Override
157+ public void run () {
158+ render (spanText , 0 );
159+ }
160+ });
161+ }
162+ }.start ();
152163 }
153164 }
154165
You can’t perform that action at this time.
0 commit comments