use of org.edx.mobile.http.notifications.FullScreenErrorNotification in project edx-app-android by edx.
the class MyCoursesListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
binding = DataBindingUtil.inflate(inflater, R.layout.fragment_my_courses_list, container, false);
errorNotification = new FullScreenErrorNotification(binding.myCourseList);
binding.swipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
// Hide the progress bar as swipe layout has its own progress indicator
binding.loadingIndicator.getRoot().setVisibility(View.GONE);
errorNotification.hideError();
loadData(false);
}
});
binding.swipeContainer.setColorSchemeResources(R.color.edx_brand_primary_accent, R.color.edx_brand_gray_x_back, R.color.edx_brand_gray_x_back, R.color.edx_brand_gray_x_back);
if (environment.getConfig().getCourseDiscoveryConfig().isCourseDiscoveryEnabled()) {
// As per docs, the footer needs to be added before adapter is set to the ListView
addFindCoursesFooter();
}
// Add empty views to cause dividers to render at the top and bottom of the list
binding.myCourseList.addHeaderView(new View(getContext()), null, false);
binding.myCourseList.addFooterView(new View(getContext()), null, false);
binding.myCourseList.setAdapter(adapter);
binding.myCourseList.setOnItemClickListener(adapter);
return binding.getRoot();
}
use of org.edx.mobile.http.notifications.FullScreenErrorNotification in project edx-app-android by edx.
the class BaseWebViewDiscoverFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
webView = (EdxWebView) view.findViewById(R.id.webview);
progressWheel = (ProgressBar) view.findViewById(R.id.loading_indicator);
errorNotification = new FullScreenErrorNotification(webView);
initWebView();
}
use of org.edx.mobile.http.notifications.FullScreenErrorNotification in project edx-app-android by edx.
the class CourseBaseActivity method onCreate.
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
super.setToolbarAsActionBar();
errorNotification = new FullScreenErrorNotification(contentLayout);
snackbarErrorNotification = new SnackbarErrorNotification(contentLayout);
Bundle bundle = arg0;
if (bundle == null) {
if (getIntent() != null)
bundle = getIntent().getBundleExtra(Router.EXTRA_BUNDLE);
}
restore(bundle);
blockDrawerFromOpening();
}
use of org.edx.mobile.http.notifications.FullScreenErrorNotification in project edx-app-android by edx.
the class AuthenticatedWebView method init.
private void init() {
inflate(getContext(), R.layout.authenticated_webview, this);
RoboGuice.injectMembers(getContext(), this);
RoboGuice.getInjector(getContext()).injectViewMembers(this);
fullScreenErrorNotification = new FullScreenErrorNotification(webView);
}
use of org.edx.mobile.http.notifications.FullScreenErrorNotification in project edx-app-android by edx.
the class CourseCombinedInfoFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
errorNotification = new FullScreenErrorNotification(announcementWebView);
snackbarErrorNotification = new SnackbarErrorNotification(announcementWebView);
}
Aggregations