I know in order to design for android devices you can make 2 images named the same thing with different resolutions and put them in the md and hd drawable folders. Android will call the correct version based on the devices screen density.
My question is this: If I have an xml file that defines a clickable image like so:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/listitemorange" />
<item android:state_pressed="true"
android:drawable="@drawable/orange_click" />
<item android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/listitemorange" />
</selector>
I have the listitemorange and the orange_click images in both the md and hd folders, but do I need to have a copy of the xml file itself in both folders, or can I just keep in it in the md folder and it will still know to call the hd images when on an hd screen?
Please let me know if that doesn’t make sense… thanks!
if you put the xml in the drawable folder, and the image in drawable-md&drawable-hd, everything will be okay.