mta452 / SheenFigureLegacy

A library to render arabic/urdu fonts on smartphones.
Apache License 2.0
30 stars 6 forks source link

Android ScrollView issue #2

Open shaks786 opened 11 years ago

shaks786 commented 11 years ago

mashaAllah you've done a brilliant job here, just a slight problem with Android:

When trying to use a scrollview, if the urdu/arabic text is longer than the screen, when the screen is scrolled the rest of the screen is blank i.e. the bitmap doesn't get drawn.

I hope I've made myself clear - to reproduce just set the text of the textview to something really long.

shaks786 commented 11 years ago

Kind of found a solution (after many hours!) , in the Activity you can override the onFling method using gesture detector, in there you can invalidate the Label so that it is redrawn, i.e. like this:

@Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { Label tv = (Label)findViewById(R.id.sf_label); tv.invalidate(); }

This may also work with the onScroll method for a scrollview, but I haven't tried it (I already was using a gesture detector)

Hope this helps!