Search in sources :

Example 1 with LoadingSurveyException

use of org.eyeseetea.malariacare.domain.exception.LoadingSurveyException in project pictureapp by EyeSeeTea.

the class SurveyFragment method showSurvey.

private void showSurvey() {
    try {
        LayoutInflater inflater = LayoutInflater.from(getActivity().getApplicationContext());
        dynamicTabAdapter = new DynamicTabAdapter(getActivity(), mReviewMode);
        View viewContent = inflater.inflate(dynamicTabAdapter.getLayout(), content, false);
        content.removeAllViews();
        content.addView(viewContent);
        ListView listViewTab = (ListView) llLayout.findViewById(R.id.listView);
        dynamicTabAdapter.addOnSwipeListener(listViewTab);
        listViewTab.setAdapter(dynamicTabAdapter);
        hideProgress();
    } catch (NullPointerException e) {
        new LoadingSurveyException(e);
    }
}
Also used : DynamicTabAdapter(org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter) LoadingSurveyException(org.eyeseetea.malariacare.domain.exception.LoadingSurveyException) ListView(android.widget.ListView) LayoutInflater(android.view.LayoutInflater) View(android.view.View) CustomTextView(org.eyeseetea.sdk.presentation.views.CustomTextView) ListView(android.widget.ListView)

Aggregations

LayoutInflater (android.view.LayoutInflater)1 View (android.view.View)1 ListView (android.widget.ListView)1 LoadingSurveyException (org.eyeseetea.malariacare.domain.exception.LoadingSurveyException)1 DynamicTabAdapter (org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter)1 CustomTextView (org.eyeseetea.sdk.presentation.views.CustomTextView)1