private void setPicture() { String pictureKey = task.getString(TaskAdapter.PICTURE); if (pictureKey != null) { service.asyncLoadFile( pictureKey, new FileLoadCallback(pictureKey) { @Override public void onCompletion(CMFile file) { byte[] pictureBytes = file.fileContents(); Bitmap asBitmap = BitmapFactory.decodeByteArray(pictureBytes, 0, pictureBytes.length); setImage(asBitmap); } }); } }
private void setTaskName() { EditText taskName = getTaskNameComponent(); taskName.setText(task.getString(TaskAdapter.TASK_NAME, "")); }