1 .定义延迟的向日葵和CheckBox
2 .添加监听程序
CB=(checkbox ) findviewbyid ) r.id.checkbox; CB.setoncheckedchangelistener (newcompoundbutton.oncheckedchangelistener ) { @ overridepublicvoidoncheckedchanged } ) comome Booleanischecked(if ) ischecked ) { //cb.getText ).toString ); toast.maketext (main activity.this,’你选择了隐藏模式!’ ,toast.Length_short(.show ); }};