@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); ExpandableListView listView = (ExpandableListView) getView().findViewById(R.id.lstSyncs); adapter = new SyncsAdapter(getActivity(), authUser.getSyncs(), authUser); changeWeek(); listView.setAdapter(adapter); getView() .findViewById(R.id.btnNextWeek) .setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { week++; changeWeek(); } }); getView() .findViewById(R.id.btnPrevWeek) .setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { week--; changeWeek(); } }); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); session = Session.getInstance(getActivity().getApplicationContext()); authUser = session.getAuthUser(); Collections.sort(authUser.getSyncs()); }