简体   繁体   中英

Display algebraic equations that look as nice as Tex in TextViews in Android Studio?

I spent like a half hour researching and many suggestion are either years oudated/no longer existent, and me being a programming beginner who doesn't know how to do more advanced things than basics like adding text/buttons/etc. and basic programming logic into Android Studio activies, I'm totally lost. Some suggestions mention inserting HTML with JavaScript references but I haven't found a guide that explains how to do it, and those making the suggestions listed some cons, too. Eg How would I display 5^2 (without the '^' and the '5' in superscript form), '1/2' in neat fraction form, etc., in a TextView or whatever other text component? I searched through the Android developer reference as well but didn't see anything that 'intuitively' stood out to me, for the lack of a better word.

You could achieve this by using WebView and JS. An example of such library for Android is: https://github.com/KaTeX/KaTeX .

I think you can use MathJax for doing that. Please refer to this GitHub repository. MathJax

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM