4
Use the escape character \n
:
android:text="linha1\nlinha2\nlinha3"
4
5
Use the escape character \n
:
android:text="linha1\nlinha2\nlinha3"
1
You can add HTML tags to your text strings.html
follows an example:
html strings.
<string name="minha_receita_1"> <![CDATA[ <ul> <li>1 caneca ou bule</li> <li>1 garrafa térmica</li> <li>1 colher (sopa)</li> <li> 1 coador de café</li> </ul> ]]> </string>
The content html
should be among <![CDATA[ ]]>
In java do the following:
TextView textHtml = TextView.class.cast(convertView.findViewById(R.id.receita));
final Spanned textoEmHtml = Html.fromHtml( getContext().getString(R.string.minha_receita_1));
textHtml.setText(textoEmHtml);
Browser other questions tagged android android-layout
You are not signed in. Login or sign up in order to post.
there is some example when the text is dynamic to break the line?
– rodrigo.oliveira