use of com.instructure.teacher.adapters.PeopleListRecyclerAdapter in project instructure-android by instructure.
the class PeopleListFragment method getAdapter.
@Override
protected PeopleListRecyclerAdapter getAdapter() {
if (mAdapter == null) {
mAdapter = new PeopleListRecyclerAdapter(getContext(), getPresenter(), new AdapterToFragmentCallback<User>() {
@Override
public void onRowClicked(User user, int position) {
CanvasContext canvasContext = getArguments().getParcelable(Const.CANVAS_CONTEXT);
if (CanvasContextExtensions.isDesigner(canvasContext)) {
Toast.makeText(getContext(), R.string.errorIsDesigner, Toast.LENGTH_SHORT).show();
return;
}
Bundle bundle = StudentContextFragment.makeBundle(user.getId(), canvasContext.getId(), true);
RouteMatcher.route(getContext(), new Route(null, StudentContextFragment.class, canvasContext, bundle));
}
});
}
return mAdapter;
}
Aggregations