android - let user change activity color -
I have four image buttons (red, blue, yellow, green), the default background color for the movement is green How can the color of the action change when the button is clicked? When the user clicks on the red button, the green background color changes from green?
By default, set the color of your parent layout and start it as an activity:
android: background = "@color / green" or layout.setBackgroundColor (Color.GREEN); Your Activity LinereLayout Layout = (LinearLayout) findViewById (RID Layouts); Start the 4 button in your write-up activity:
Layout. Setback Gang Color (Color .rd); Layout.setBackgroundColor (Color.BLUE); Layout.setBackgroundColor (Color.YELLOW); Layout.setBackgroundColor (Color.GREEN); Where layout is your main layout xml file
Set color above special button
Comments
Post a Comment