How to add Colour

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to add Colour

Postby agnimitra » Tue Jan 13, 2009 6:43 am

Hello members,
I'm very new on Android..Just learning it and making basic applications program...

I'm working on my own app.. ao will anyone will plz help me and tell me that

How to change my background color from black to blue ..what code must be added and in which file...

My android version---0.8.0.v200809220836
Eclipse version----3.4.1

Sorry if repost or u feel childish question...

Thanks in advance

Best Regards,
AGNIMITRA
:P :P :P :P :P
Attachments
agni.PNG
Android Screen
agni.PNG (55.28 KiB) Viewed 189 times
agnimitra
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Dec 17, 2008 12:08 pm
Location: Bangalore

Top

Postby Emmanuel7 » Wed Jan 14, 2009 11:21 am

You should have a xml file for your activity.

In this xml file, there is a top most view group ( I would say a linear layout from your image ).
You should add this parameter in your layout :
Syntax: [ Download ] [ Hide ]
  1. android:background="#0000ff" 
  2.  


( or whatever color you want )
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby agnimitra » Wed Jan 14, 2009 3:50 pm

Emmanuel7 wrote:You should have a xml file for your activity.

In this xml file, there is a top most view group ( I would say a linear layout from your image ).
You should add this parameter in your layout :
Syntax: [ Download ] [ Hide ]
  1. android:background="#0000ff" 


( or whatever color you want )


In my main.xml ???
agnimitra
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Dec 17, 2008 12:08 pm
Location: Bangalore

Postby Quetzalcoatl » Wed Jan 14, 2009 5:12 pm

If you search through the files in your application in Eclipse you will see a file called main.xml; This contains all the layout information for your activity.
Image
Quetzalcoatl
Senior Developer
Senior Developer
 
Posts: 129
Joined: Sat Oct 18, 2008 8:21 pm
Location: near Manchester, UK

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests