use of com.instructure.candroid.adapter.PeopleListRecyclerAdapter in project instructure-android by instructure.
the class PeopleListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mAdapterToFragmentCallback = new AdapterToFragmentCallback<User>() {
@Override
public void onRowClicked(User user, int position, boolean isOpenDetail) {
Navigation navigation = getNavigation();
if (navigation != null) {
navigation.addFragment(FragUtils.getFrag(PeopleDetailsFragment.class, PeopleDetailsFragment.createBundle(user, getCanvasContext())));
}
}
@Override
public void onRefreshFinished() {
setRefreshing(false);
}
};
mRootView = getLayoutInflater().inflate(R.layout.fragment_people_list, container, false);
mToolbar = mRootView.findViewById(R.id.toolbar);
CardView cardView = mRootView.findViewById(R.id.cardView);
if (cardView != null) {
cardView.setCardBackgroundColor(Color.WHITE);
}
mRecyclerAdapter = new PeopleListRecyclerAdapter(getContext(), getCanvasContext(), mAdapterToFragmentCallback);
configureRecyclerView(mRootView, getContext(), mRecyclerAdapter, R.id.swipeRefreshLayout, R.id.emptyPandaView, R.id.listView);
return mRootView;
}
Aggregations