use of com.instructure.candroid.adapter.PageListRecyclerAdapter in project instructure-android by instructure.
the class PageListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
mRootView = getLayoutInflater().inflate(R.layout.fragment_course_pages, container, false);
mToolbar = mRootView.findViewById(R.id.toolbar);
mRecyclerAdapter = new PageListRecyclerAdapter(getContext(), getCanvasContext(), new AdapterToFragmentCallback<Page>() {
@Override
public void onRowClicked(Page page, int position, boolean isOpenDetail) {
Navigation navigation = getNavigation();
if (navigation != null) {
Bundle bundle = PageDetailsFragment.Companion.createBundle(page.getUrl(), getCanvasContext());
navigation.addFragment(FragUtils.getFrag(PageDetailsFragment.class, bundle));
}
}
@Override
public void onRefreshFinished() {
setRefreshing(false);
}
}, mDefaultSelectedPageTitle);
configureRecyclerView(mRootView, getContext(), mRecyclerAdapter, R.id.swipeRefreshLayout, R.id.emptyPandaView, R.id.listView);
return mRootView;
}
Aggregations