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.
2. Right click on values > new > Values resource file
3. A new dialog box should then show up enabling you to enter a name for the resource. It should always be called colors.
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