Code example for CheckedTextView

Methods: setText, setChecked

0
		addressText = (TextView)findViewById(R.id.address_text);
	} 
 
	public void setTask(Task task) {
		this.task = task;
		checkbox.setText(task.getName());
		checkbox.setChecked(task.isComplete());
		if (task.hasAddress()) {
			addressText.setText(task.getAddress());
			addressText.setVisibility(View.VISIBLE);
		} else { 
			addressText.setVisibility(View.GONE);
		} 
	} 
 
	public Task getTask() { 
		return task;
	} 
 
}