Professional Documents
Culture Documents
android.content.Context;
android.view.LayoutInflater;
android.widget.CheckBox;
android.widget.LinearLayout;
android.widget.TextView;
public void
onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
work.setChecked(isChecked);
}
});
//Ly v ni dung cho TextView v CheckBox
da vo i tng Work hin ti
workContent.setText(work.getContent());
timeContent.setText(work.getTime());
checkWork.setChecked(work.isChecked());
}
return workView;
}
}
ListWorkAdapter s c s dng thay th cho ArrayAdapter c bind vi
ListView. Thng thng ArrayAdapter ch cho hin th String bng TextView,
nhng vi vic k tha v override phng thc getView, ta c th nh ngha li
hin th cho cc thnh phn ca ListView.