The World’s Largest Online Community for Developers
I'm learning how to make Android apps and I'm using a book. In this book there is an exercise which asks to create a view and a button. When you click on a button the view changes. Now I got as far as to make the view(square shape) change color when I click the button but the exercise wants the colors to change like a traffic light. So every time you click the button it should change background colors green, yellow, and red. Mine just changes once and that's it. I click and the color doesn't change anymore. Am I missing a while loop maybe?