use of ca.etsmtl.applets.etsmobile.views.AnimatedExpandableListView in project ETSMobile-Android2 by ApplETS.
the class EventsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_events, container, false);
expandableListView = (AnimatedExpandableListView) v.findViewById(R.id.expandable_list_view);
progressBar = (ProgressBar) v.findViewById(R.id.progress_bar);
progressBar.setProgress(0);
expandableListAdapter = new EvenementCommunauteAdapter(getActivity(), events, expandableListView);
expandableListView.setAdapter(expandableListAdapter);
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
// expansion/collapse.
if (expandableListView.isGroupExpanded(groupPosition)) {
expandableListView.collapseGroupWithAnimation(groupPosition);
} else {
expandableListView.expandGroupWithAnimation(groupPosition);
}
return true;
}
});
AnalyticsHelper.getInstance(getActivity()).sendScreenEvent(getClass().getSimpleName());
return v;
}
Aggregations