-
Notifications
You must be signed in to change notification settings - Fork 0
Adapter
Stefania Bezerra da Silva edited this page May 13, 2017
·
1 revision
| Data | Versão | Descrição | Autor |
|---|---|---|---|
| 11/05/2017 | 1.0 | Criação do documento | Stefania Bezerra |
| 11/05/2017 | 1.0 | Inserção do código | Stefania Bezerra |
private ArrayList<Task> tasks;
public TaskListAdapter(Context context, ArrayList<Task> tasks) {
super(context, 0, tasks);
this.tasks = tasks;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// Check if an existing view is being reused, otherwise inflate the view
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.task_list, parent, false);
}
TextView tvTask = (TextView) convertView.findViewById(R.id.tl_task_name);
TextView tvDate = (TextView) convertView.findViewById(R.id.tl_task_date);
tvTask.setText(tasks.get(position).getTaskDescription());
tvDate.setText(tasks.get(position).getDateEvent().toString());
return convertView;
}
}Processo
Requisitos
Análise e Design
Padrão de Projeto
Gerenciamento do Projeto