In my app I am loading a html document (contains: the code to display an equation, reference to libraries) into a webview.
The problem is that it still takes some t
Yes, this is possible :
textView.setText(Html.fromHtml(myHTMLString));
Yes, it is possible for achieving this you need to convert Input Stream from your local storage file path and create one String Builder to read every single line from Input Stream -
// "string" is a your html file path
File file = new File(string);
try {
FileInputStream fileInputStream = new FileInputStream(file);
BufferedReader r = new BufferedReader(new
InputStreamReader(fileInputStream));
StringBuilder strBuilder = new StringBuilder();
String line;
while ((line = r.readLine()) != null) {
strBuilder.append(line).append("\n");
}
//"total" is your converted html you can show this on textview
areTextView.fromHtml(String.valueOf(strBuilder));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}