Search in sources :

Example 1 with EvenementCommunauteAdapter

use of ca.etsmtl.applets.etsmobile.ui.adapter.EvenementCommunauteAdapter 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;
}
Also used : EvenementCommunauteAdapter(ca.etsmtl.applets.etsmobile.ui.adapter.EvenementCommunauteAdapter) View(android.view.View) AnimatedExpandableListView(ca.etsmtl.applets.etsmobile.views.AnimatedExpandableListView) ExpandableListView(android.widget.ExpandableListView) AnimatedExpandableListView(ca.etsmtl.applets.etsmobile.views.AnimatedExpandableListView) ExpandableListView(android.widget.ExpandableListView)

Aggregations

View (android.view.View)1 ExpandableListView (android.widget.ExpandableListView)1 EvenementCommunauteAdapter (ca.etsmtl.applets.etsmobile.ui.adapter.EvenementCommunauteAdapter)1 AnimatedExpandableListView (ca.etsmtl.applets.etsmobile.views.AnimatedExpandableListView)1