jianzhongli / MathView

A library for displaying math formula in Android apps.
Apache License 2.0
1.01k stars 190 forks source link

MathJax: Formular gets rerendered a few times #35

Open Makman2 opened 7 years ago

Makman2 commented 7 years ago

When initializing my activity which uses a MathView with MathJax, it renders a few times until the final rendered results is ready. This looks a bit ugly as especially the layout/dimensions of the view do change.

Is there a possibility to wait until the rendering is done completely? Or at least it starts-up empty and renders just once, instead 3-4 times?

rafaelpezzuto commented 7 years ago

I am facing this problem too. This issue did not occur with KaTeX, but I have to use MathJax because of its new line and autoscale features.

To solve it I made a temporary fix using visibility attribute of the MathView. I start it with INVISIBLE. When I do calc, I set it to VISIBLE using a handler.postDelayed(3000), i.e., with 3 seconds delayed. But this is not the ideal solution. :(

Makman2 commented 7 years ago

but it's at least a workaround :+1: :)