Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/04/2015, 03:22
Avatar de ipraetoriux
ipraetoriux
 
Fecha de Ingreso: abril-2010
Ubicación: ipraetoriux.com
Mensajes: 1.125
Antigüedad: 14 años
Puntos: 155
Respuesta: Texto y estilo en Texview

...tenes que usar CDATA en el XML

Código XML:
Ver original
  1. <string name="html"><![CDATA[<p>texto<p>]]></string>

...y luego en el Java:

Código Java:
Ver original
  1. miTextView.setText(Html.fromHtml(getString(R.string.html)));

...igualmente OJO!!!, una app no es una pagina web, hay algunos formatos que no te van a funcionar. Si tenes que incluir mucho texto ya con mucho formato y estilos del tipo CSS, te conviente hacer un HTML aparte, y cargarlo en un WebView