My code has 5 drawable folders (drawable, drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-sw330dp)
. Each one is used for different screen densities. I have tested each resolution and adjusted accordingly. The only problem so far is that when I test the application on a Droid RAZR, my shapes are drawn incorrectly. The screen size for that particular phone is 540px x 960px.
I have tried three different drawable folder names:
1) drawable-sw330dp
2) drawable-sw540dp
3) drawable-sw225dp
<< This was suggested by @CommonsWare below
None are adjusting to the xml files that are stored within. It seems like the phone is using the drawable-hdpi instead of going into the specific (sw) folder. Is there another way to make sure that the phone references the right folder?
Example xml file that draws the shapes (used as a background):
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/menu_active" />
<padding android:left="1dp" />
</shape>
</item>
<item>
<rotate
android:fromDegrees="135"
android:pivotX="96.5%"
android:pivotY="82%"
android:toDegrees="45" >
<shape android:shape="rectangle" >
<solid android:color="#000" />
<padding android:left="1dp" />
</shape>
</rotate>
</item>
It looks like drawable-w330dp-normal
works for the Droid RAZR. Just create the folder and store the modified drawable there.