Switch statment fix: The switch statement is only returning the last case i.e case 4, \"#0R0dfdf0FF\". how can i fix this so the text view shows the the one cli
Fall Through.
You have to add the break
.
case 0:
mColor.setText("#000000");
break;
You can find that in docs
The break statements are necessary because without them, statements in switch blocks fall through: All statements after the matching case label are executed in sequence, regardless of the expression of subsequent case labels, until a break statement is encountered.