Search in sources :

Example 1 with MyCoursesAdapter

use of org.edx.mobile.view.adapters.MyCoursesAdapter in project edx-app-android by edx.

the class OldMyCoursesListFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);
    adapter = new MyCoursesAdapter(getActivity(), environment) {

        @Override
        public void onItemClicked(EnrolledCoursesResponse model) {
            environment.getRouter().showCourseDashboardTabs(getActivity(), environment.getConfig(), model, false);
        }

        @Override
        public void onAnnouncementClicked(EnrolledCoursesResponse model) {
            environment.getRouter().showCourseDashboardTabs(getActivity(), environment.getConfig(), model, true);
        }
    };
    EventBus.getDefault().register(this);
}
Also used : MyCoursesAdapter(org.edx.mobile.view.adapters.MyCoursesAdapter) EnrolledCoursesResponse(org.edx.mobile.model.api.EnrolledCoursesResponse)

Example 2 with MyCoursesAdapter

use of org.edx.mobile.view.adapters.MyCoursesAdapter in project edx-app-android by edx.

the class MyCoursesListFragment method onCreate.

// TODO: All these callbacks aren't essentially part of MyCoursesListFragment and should move in
// the Tabs container fragment that's going to be implemented in LEARNER-3251
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    adapter = new MyCoursesAdapter(getActivity(), environment) {

        @Override
        public void onItemClicked(EnrolledCoursesResponse model) {
            environment.getRouter().showCourseDashboardTabs(getActivity(), environment.getConfig(), model, false);
        }

        @Override
        public void onAnnouncementClicked(EnrolledCoursesResponse model) {
            environment.getRouter().showCourseDashboardTabs(getActivity(), environment.getConfig(), model, true);
        }
    };
}
Also used : MyCoursesAdapter(org.edx.mobile.view.adapters.MyCoursesAdapter) EnrolledCoursesResponse(org.edx.mobile.model.api.EnrolledCoursesResponse)

Aggregations

EnrolledCoursesResponse (org.edx.mobile.model.api.EnrolledCoursesResponse)2 MyCoursesAdapter (org.edx.mobile.view.adapters.MyCoursesAdapter)2