A style is a collection of attributes that specify the appearance for a single View. Just create a Layout and put your items there (and change the colors) Using the backgroundTint attribute as suggest by Zaid Mirza. On click of radio button background color of view will be changed as per name. I would give you full code below at the end of the post including XML file along with the main Java file. this my app image : this my button in XML layout : So here is the complete step by step tutorial for Set layout background color programmatically android. Hint: You can use findViewById in this case. As stated above in the post that we are going to put three radio buttons, I have included three RadioButton tags each one having its text color set to different ones.