How to set up a colors XML file

ProgramThat;

It is essential to have a colors XML file in every android project you create. To be used the same color multiple times and hardcode it is not good programming practise. It is easy to forget about one when you are a beginner.

I am going to step you through how to create one and link it up to your android page. To do so I am going to use the main page which we have already created in the previous guides.

1. Go to values Image

 

2. Right click on values > new > Values resource file

Image

3. A new dialog box should then show up enabling you to enter a name for the resource.  It should always be called colors.

Image

4. You will then be taken to you new XML page once you click OK. In there you can begin to declare the colors which you…

View original post 251 more words

Advertisements

About Anuroop D

Very enthusiastic about technology and likes to share my knowledge through blogging. Has Bachelor's in Information Technology and currently pursuing my Master's in Computer Science.
This entry was posted in Android Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s