I have created bg3.9.png image following this tutorial
http://developer.android.com/guide/developing/tools/draw9patch.html
but when i put it in my drable folder and try to use it then it gives error in the project
please see the image.
The code in main.xml file is :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:background="@drawable/bg3">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:columnWidth="65dp"
android:numColumns="auto_fit" android:verticalSpacing="10dp"
android:horizontalSpacing="10dp" android:stretchMode="columnWidth"
android:gravity="center" android:layout_gravity="center_vertical|center_horizontal"/>
</LinearLayout>
Please guide me on what i have done wrong ?
It is difficult to see the name in your screenshot but it doesn’t look like your image is named bg.9.png, it looks like it has a three letter name (wheras your code references @drawable/bg)
It should not be named bg3.9.png, it should be named bg.9.png