-1
votes

Comment utiliser "OL" Tag HTML dans Android TextView

Comment afficher "OL" TAG HTML dans Android TextView. J'utilise déjà widget webview et ça marche bien, mais je souhaite utiliser TextView pour afficher le contenu HTML.


3 Réponses :


0
votes

Ajoutez ceci à votre TextView

p>

 TextView yourTextView =(TextView)findViewById(R.id.text);        
 
 yourTextView.setText(Html.fromHtml("<p align=right> <b> "+ "I am humman" + "  </b> </p>"));


0 commentaires

-1
votes

Vous pouvez afficher la balise HTML "OL" avec le code suivant.

val displayText = Html.fromHtml(
        "<ol>\n" +
        "<li>First</li>\n" +
        "<li>Second</li>\n" +
        "<li>Third</li>\n" +
        "<li>Fourth</li>\n" +
        "<li>Fifth</li>\n" +
        "</ol>"
)
displayTextView.text = txt


1 commentaires

Non, parce que la tag n'est pas prise en charge. développeur.android.com/Guide/topics/resources/... < / a>



0
votes

Recommander ceci:

htmlcompat.fromhtml ("mot de passe oublié", htmlcompat.from_html_mode_legacy)


0 commentaires