1
我怎樣才能顯示一個彈出立即複選框採用的是Android檢查POP_UP上覆選框選擇
我怎樣才能顯示一個彈出立即複選框採用的是Android檢查POP_UP上覆選框選擇
CheckBox yourCheckBox = (CheckBox) findViewById(R.id.yourCheckBox);
yourCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
if (isChecked)
{
//call popup
}
}
});
你只需要聲明一個回調的CheckedChanged
事件上的文本框,然後解僱你的方法顯示彈出框