My Android App has a few screens where the user can tap a button, and help text pops up in a DialogFragment. Currently the text for these DFs is stored in strings.xml, like this:
<string name="help_content">
<![CDATA[<h1>Welcome</h1>
<p>Here is some helpful information</p>]]></string>
Obviously, this lets me add styles to the text to make it look better.
In a couple of places, I'd like to explain what some icons do, and I want to include images of the icons, so I'd like to do something like this:
<string name="help_content">
<![CDATA[<h1>Welcome</h1>
<p><img src="path/to/icon1"> This is what Icon 1 does</p>
<p><img src="path/to/icon2"> This is what Icon 2 does</p>]]></string>
Is there a way to include the images so that they use the actual ones from the app? ie something along the lines of getResources().getDrawable(R.drawable.icon_1)
or @drawable/icon_1
or something, which can be referenced from the CDATA. I've tried both of those, but got the red error line.