jianzhongli / MathView

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

WebViewClient not work #72

Open QuanKun8296 opened 4 years ago

QuanKun8296 commented 4 years ago

Hi! I'm using MathView for show html mathml and an url, with WebView i can click to url but it not work when i set view is MathView. Can you tell me how i can set webViewClient for catch event click url like WebView. Best Regards!

DrunkenElf commented 4 years ago

Have you tried to override shouldInterceptRequest method?

QuanKun8296 commented 4 years ago

I tried and it's still not work. Are you made it work? Please give me example for this simple html "<p>See more:<a href="https://vi.wikipedia.org/wiki/MathML">Click here</a></p>"

DrunkenElf commented 4 years ago

I think you will not be able to do it with this library, cuz it renders formulas with chunk and just load data(like simple string). That's why the method are called . You can try to inject mathjax script "

See more:Click here

". This will also help you "

See more:Click here

".

QuanKun8296 commented 4 years ago

Thanks for your reply. BTW, your code which inject mathjax script has been changed and i can't see the construction.

DrunkenElf commented 4 years ago

I'll try to send it to you, but now I don't have enough time for time