match a nine-patch image with simple image
I want to put two images together (a nine-patch image with icon), So that icon size does not change.
I designed nine-patch image but i don't match these images together. Is there anyone who can help me?
You can use the android layer list drawable. This allows to stack layers on top of each other. The first layer can hold the nine patch image and the second layer can hold the icon which wont be stretched.
This is how it would look like
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/wp_tabbuttonstrip"/> <item> <bitmap android:src="@drawable/wp_dashboard_icon" android:gravity="center"/> </item> </layer-list>
You will need to specify the size of the view, wrap content might not give the desired results.