android ListView 嵌入Switch控件后,如何通过按键选中Switch

日期:2021-12-27 13:57:37 人气:1

android ListView 嵌入Switch控件后,如何通过按键选中Switch

adroidstudioswitch控件的用法如下:Switchsc=(Switch)findViewById(R.id.switch1);sc.setOnCheckedChangeListener(newCompoundButton.OnCheckedChangeListener(){@OverridepublicvoidonCheckedChanged(CompoundButtoncompoundButton,booleanb){if(b){Toast.makeText(getApplication
    A+
热门评论