Please have a look at the following code
strings.xml
<string name="measurements_description"><html><font color="#FFFAF0">I want to have white color for the whole text.
<br/>This text comes in a new line<font color="red">This text is red </font>
<br/>This is another line. Again, color is white </font></html></string>
male_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/measurementsDescription"
android:text="@string/measurements_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</RelativeLayout>
</ScrollView>
Form.java (This is belongs to the main layout activity_form)
public boolean onMenuItemSelected(int id, MenuItem item) {
//Toast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();
TextView msg = new TextView(this);
msg.setText("<html><u>Message</u></html>");
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this);
//alertBuilder.setMessage("<html><u>Message</u></html>");
alertBuilder.setTitle("Male Measurement Instructions");
LayoutInflater li = getLayoutInflater();
View v = li.inflate(R.layout.male_layout, null);
alertBuilder.setView(v);
alertBuilder.setCancelable(false);
alertBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
//alertBuilder.finish();
}
});
AlertDialog alertDialog = alertBuilder.create();
alertDialog.show();
return true;
}
This is how it gets displayed, without responding to any of the HTML in the string.xml file. Why this is not changing it's colors as coded in HTML? Why it is not keeping line breaks as coded in HTML?

How to solve this issue? Please help!
<html>and other tags directly in dialog?<br />is not supported but you can use\n. For coloring, you can set the textview's font color likeColor.BLACKor parse a color likeColor.parseColor("#FFFAF0").WebView