I have some images in my App and want to use the same reference for multiple screens, is it possible to use the scale tag in xml to re-size the image and use it with different resolutions? when i tried it the picture disappeared!
For example i did this :
First of all i created new XML file add_more_items_scaled
<?xml version="1.0" encoding="utf-8"?>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/add_more_items"
android:scaleWidth="75%"
android:scaleHeight="75%">
</scale>
then created another XML file add_more_items_button
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/button_pressed"
android:state_pressed="true"></item>
<item android:drawable="@drawable/add_more_items_scaled"
android:state_focused="true"></item>
<item android:drawable="@drawable/add_more_items_scaled"></item>
and when i set the background of the button @android:background:"@drawable/add_more_items_button" it gives me an empty button
So, any suggestions?