|
@@ -42,7 +42,7 @@ public class ListAdapter extends ArrayAdapter<WatchModel> {
|
|
|
WatchModel model = getItem(position); // 获取当前项的Fruit实例
|
|
|
View view;
|
|
|
if (mHandler != null && model.title.equals("loggable")) {
|
|
|
- view = LayoutInflater.from(getContext()).inflate(R.layout.item_wifi_switch, null);
|
|
|
+ view = LayoutInflater.from(getContext()).inflate(R.layout.item_switch, null);
|
|
|
Switch itemSwitch = view.findViewById(R.id.item_switch);
|
|
|
itemSwitch.setChecked(model.isSwitchOn);
|
|
|
itemSwitch.setOnCheckedChangeListener((compoundButton, b) -> {
|
|
@@ -53,7 +53,7 @@ public class ListAdapter extends ArrayAdapter<WatchModel> {
|
|
|
}
|
|
|
);
|
|
|
} else if (mHandler != null && model.title.equals("Debugable")) {
|
|
|
- view = LayoutInflater.from(getContext()).inflate(R.layout.item_wifi_switch, null);
|
|
|
+ view = LayoutInflater.from(getContext()).inflate(R.layout.item_switch, null);
|
|
|
Switch itemSwitch = view.findViewById(R.id.item_switch);
|
|
|
itemSwitch.setChecked(model.isSwitchOn);
|
|
|
itemSwitch.setOnCheckedChangeListener((compoundButton, b) -> {
|