use of org.eyeseetea.malariacare.layout.adapters.survey.ITabAdapter in project pictureapp by EyeSeeTea.
the class SurveyFragment method prepareTab.
/**
* Prepares the selected tab to be shown
*/
private View prepareTab(Tab selectedTab) {
LayoutInflater inflater = LayoutInflater.from(getActivity().getApplicationContext());
if (selectedTab.isCompositeScore()) {
//Initialize scores x question not loaded yet
List<Tab> notLoadedTabs = tabAdaptersCache.getNotLoadedTabs();
ScoreRegister.initScoresForQuestions(Question.listAllByTabs(notLoadedTabs), Session.getMalariaSurvey());
}
ITabAdapter tabAdapter = tabAdaptersCache.findAdapter(selectedTab);
return inflater.inflate(tabAdapter.getLayout(), content, false);
}
Aggregations