I found this question, and that works fine. But I have a resource string which is a format string that goes into String.format
.
Consider R.string.test
to be This is a test: <b>%1$s</b>
.
Then this code:
getActionBar().setTitle(String.format(getString(R.string.test), "TEST"));
does not show bold, but this does (but it doesn't show the replaced string obviously):
getActionBar().setTitle(getResources().getText(R.string.test));
How can I use String.format
to create a formatted title?