randheersingh wrote:
> Hi, I am just trying to run the relative example given in the sample
> code of Google documentation of android. Its just ran. But when I
> added the background property of relative layout an error is coming. I
> am giving the code of XML file here and the error. Please tell me what
> this error wants to tell and how to solve it.
> 
> Code:
> <?xml version="1.0" encoding="utf-8"?>
> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>     android:background="@drawable/blue"   // the error is here
>     android:padding="10px" >
>     <TextView
>         android:id="@+id/label"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:text="Type here:"/>
>     <EditText
>         android:id="@+id/entry"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:background="@android:drawable/editbox_background"
>         android:layout_below="@id/label"/>
>     <Button
>         android:id="@+id/ok"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_below="@id/entry"
>         android:layout_alignParentRight="true"
>         android:layout_marginLeft="10dip"
>         android:text="OK" />
>     <Button
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_toLeftOf="@id/ok"
>         android:layout_alignTop="@id/ok"
>         android:text="Cancel" />
> </RelativeLayout>
> 
> 
> Error--
>   ERROR Error: No resource found that matches the given name (at
> 'background' with value '@drawable/ blue').
> 
> Please give the answer fast.

It may the space between the @drawable/ and the blue. Or, it may be that
you do not have res/drawable/blue.png in your project.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to