开发者

Pop_up on checkbox selection

How can I display a pop-up开发者_JAVA百科 immediately a checkbox is checked in Android?


CheckBox yourCheckBox = (CheckBox) findViewById( R.id.yourCheckBox );
yourCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
   public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
   {
      if (isChecked)
         {
            //call popup
         }
   }
});

You just need to declare a call back for the CheckedChanged Event on the text box and then fire your method that displays the popup

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜