use of ve.com.abicelis.remindy.model.attachment.AudioAttachment in project Remindy by abicelis.
the class TaskDetailActivity method onClick.
@Override
public void onClick(View v) {
int id = v.getId();
mAttachmentsFabMenu.close(true);
switch(id) {
case R.id.activity_task_detail_add_list_attachment:
addAttachment(new ListAttachment());
break;
case R.id.activity_task_detail_add_text_attachment:
addAttachment(new TextAttachment(""));
break;
case R.id.activity_task_detail_add_link_attachment:
addAttachment(new LinkAttachment(""));
break;
case R.id.activity_task_detail_add_image_attachment:
addAttachment(new ImageAttachment());
break;
case R.id.activity_task_detail_add_audio_attachment:
addAttachment(new AudioAttachment());
break;
case R.id.activity_task_detail_done_button:
if (mTask.getDoneDate() == null) {
mTask.setDoneDate(CalendarUtil.getNewInstanceZeroedCalendar());
mTask.setStatus(TaskStatus.DONE);
} else {
mTask.setDoneDate(null);
mTask.setStatus((mTask.getReminderType() == ReminderType.NONE ? TaskStatus.UNPROGRAMMED : TaskStatus.PROGRAMMED));
}
mTaskDataUpdated = true;
//Force a TASK_DETAIL_RETURN_ACTION_EDITED_REMINDER state.
mOldReminderJson = "!";
setUpDoneOrOverdue();
break;
}
//Scroll to added item
if (mAdapter != null && mAdapter.getItemCount() > 0)
mRecyclerView.smoothScrollToPosition(mAdapter.getItemCount() - 1);
}
Aggregations