If you want to use a string with html tags and combine it with string parameters, this can be done as follows:
In the layout:
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{activity.formattedString}" />
In your activity (for example):
public CharSequence getFormattedString() { if(selectedItem == null) return null; String str = String.format(Html.toHtml(SpannedString.valueOf(this.getResources().getText(R.string.your_tagged_string))), parameter); return Html.fromHtml(str); }
source share