android ListView 嵌入Switch控件后,如何通过按键选中Switch
android ListView 嵌入Switch控件后,如何通过按键选中Switch
日期:2021-12-27 13:57:37 人气:1
adroidstudioswitch控件的用法如下:Switchsc=(Switch)findViewById(R.id.switch1);sc.setOnCheckedChangeListener(newCompoundButton.OnCheckedChangeListener(){@OverridepublicvoidonCheckedChanged(CompoundButtoncompoundButton,booleanb){if(b){Toast.makeText(getApplication