I am working on an Android application. I want to change the background of a LinearLayout element.
What attribute can I set in order to change its background?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to set through xml using android’s default color codes, then you need to do as below:
If you have colors specified in your project’s
colors.xml, then use:If you want to do programmatically, then do: