use of com.instructure.speedgrader.adapters.SubmissionsAdapter in project instructure-android by instructure.
the class RubricHeaderViewHolder method populateSubmissions.
private void populateSubmissions(ArrayList<Submission> submissionList) {
// Canvas API sometimes returns fake submissions. Filter these out.
SubmissionsAdapter submissionAdapter = new SubmissionsAdapter(mContext, R.layout.rubric_spinner_item, submissionList);
submissionSpinner.setAdapter(submissionAdapter);
setSpinnerSelectionByAttempt(currentAttempt);
}
use of com.instructure.speedgrader.adapters.SubmissionsAdapter in project instructure-android by instructure.
the class RubricHeaderViewHolder method getVersionSelectListener.
private AdapterView.OnItemSelectedListener getVersionSelectListener() {
return new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Submission submission = ((SubmissionsAdapter) submissionSpinner.getAdapter()).getItem(position);
if (mSubmission.getAttempt() != submission.getAttempt()) {
mSubmission = submission;
currentAttempt = submission.getAttempt();
mSubmissionListener.onSubmissionSelected(submission);
populateAttachments(submission.getAttachments());
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
};
}
Aggregations