Overall, the button to change the current android is triggered when you click to change the focus of the background color, when losing focus back to the original background color, but now the demand is that the button is clicked, this button is always click
the colors, when clicking another button or other button, it changes back to the original color, that you can not use pictures
Because this will only achieve lose focus in front of the background color
Now addressed in the activity which directly change the background color using setBackgroundResource
btn_tizheng.setBackgroundResource (R.drawable.btn_tizheng_down);
btn_yizhu.setBackgroundResource (R.drawable.btn_yizhu);
btn_jiancha.setBackgroundResource (R.drawable.btn_jiancha);
btn_jianyan.setBackgroundResource (R.drawable.btn_jianyan);
btn_bingli.setBackgroundResource (R.drawable.btn_bingli);
Is there a better way Great God Why, because the buttons more than 100 words, write at least need more than 2,000 lines of code
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Xml file in which you want to add an android:. State_pressed = "false"
Reply:
selector trial no less than 50 times, not a success, your a lot of things that I have to pay more, but no, nothing fundamental in the selector is drama, there is a good way in activity to achieve it? For example, you first class with a button to record until you've clicked on. As historical data and then click on the new button when you first button on the history of the recovery in the new button to change the background.
Reply:
The landlord did not solve this problem, I have just encountered the same problem
Reply:
If the radio, then you can try RadioButton
Reply:
You can use the RadioButton
Reply:
Landlord solved? Under the method it says
No comments:
Post a Comment