예제 #1
0
  @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();
              }
            });
  }
예제 #2
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    session = Session.getInstance(getActivity().getApplicationContext());
    authUser = session.getAuthUser();
    Collections.sort(authUser.getSyncs());
  }