I have tried the following code to draw a horizontal line between two lines in text view:
String line1="<br>This is line 1</br>";
String line2=" This is line 2";
String htmlCode =line1 +"<hr>"+line2;
myTextView.setText(Html.fromHtml(htmlCode));
I also tried:
String line1="<br>This is line 1</br>";
String line2=" This is line 2";
String htmlCode =line1 +"<span style='border-bottom:1px solid'</span>"+line2;
I am trying to store this code into database and further fetch the text and display in view.
String htmlCode= GetTextFromDB();
myTextView.setText(Html.fromHtml(htmlCode));
the horizontal line part/span with border is not working where all other markups like br
and
are working well