简体   繁体   中英

Display the Toast message when i was clicking the disabled check box

I used web service, I get the check box dynamically. But the check boxes are enabled by one by one. Suppose if i click first check box second check box only enable others are disabled, if check the second check box third check box only enable others are disabled and so on... So I need to display Toast if i click the disabled check box. Thanks.

如果手动禁用取消选中CheckBoxes,则应该可以通过单击.isEnabled()的视图状态来获取它。

Something like

CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox_id);


     if (checkBox.isChecked()) {

     }else{
   //display toast here...

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM