I am creating a mathematics app and have to display mathematical equations in my app. There are many answers related to this but I am not able to conclude how to do this?
As mentioned in the comments above you can use that library MathView or other possibilities are ,
You can go with using the spannable string and can make superscripts
and subscripts easily.
You can also use the HTML.fromHTML(String html) which will give you
the spanned text and that you can set it to the TextView.
Or else show a webview and load the html page that contains the
formulas and solutions. (This will be like creating a dynamic html
files with in the app and showing it in the Webiew)
Related
I have gone through this link for reference
https://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html
The information is right there on your link. To use it as a spannable you have to call the fromHtml() method on your textview. After initializing the component. Please refer to this question:
How to display HTML in TextView?
All your answers are there, sorry for not formatting the answer correctly I'm on mobile at the moment
I am trying to develop a Maths Question and answer Native Android application where there are a dynamic number of answer options. And answers can contain Latex and image content. So I have to use Webview. Since User should be able to select only one option I have to wrap it in a radio group with dynamic number of radioButtons(because of dynamic answer options).
I have tried using Linearlayout to wrap the webview & Listview with webview, and other popular methods. But nothing works.
Is there any other way we can achieve this in Android? How can I achieve this?
I'm creating a note taking app for Android and i would like the user to be able to format their text, i.e. bold, different text sizes.
What I would like to know is how can I do this bearing in mind the text will have to be store-able in a database.
Can i use a web view with a string of HTML i pull from the database and a custom defined CSS to style it on the user end?
I also know there is some sort of formatting class in Android but im unsure of how it work, im not convinced it would be easy to store the formatting information.
I think you should use Spannable text. See android.text.*. I think you should store the text in HTML markup. Also take a look at
http://developer.android.com/guide/faq/commontasks.html#selectingtext
I hope you can point me in a right direction,
Im making a Android app that gets content of a website,
At the moment my app loads dat webpage in a webview, but the page is to wide for almost every screen, so i had another idea:
webcontent(html) -> get contents of table with android -> make a listview -> when sliding right you get another day.
the webcontent is a timetable for school, a example is this one http://intranet.staring.nl/toepassingen/rooster/lochem/2W2/2012102920121104/2W01532.htm
what i want is that every day comes in a listview and that a user can swap right or left to change the day there seeing.
Now im getting already stuck on making the listview from the html source, can somebody help me with this?
You should access those data using a webservice...
Because otherwise you'll need to download a LOT of useless HTML code + parse it...
But IF this is the way you want to go, or you have no control over that website, you could read the file and simply parse it using regular expressions I guess.
Here are some tools I found:
JTidy
JSoup
Parsing HTML in Java?
I am writing an android application that will be displaying codes... specially java codes, or maybe jsp code as well. I was thinking about placing these codes in a TextView. However i dont know how to do this for android. I didnt find any tutorial or documentation on how to display formated text in a TextView. I know I can put html in there, so one direction would be format the code itself in html and then place it in the textview.
Is there a better way to do that?
Many thanks
T
TExtView can't do all the formatting. HTML is the best guess.
Search for "Spannable HTML Textview Android" and you will get quite a few examples. Here is one.
Is it possible to have multiple styles inside a TextView?