Пример #1
0
  @Override
  public boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) {
    if (builder != null) {
      builder.cleanUp();
    }

    switch (item.getItemId()) {
      case R.id.today:
        builder = new TodaysMeetingViewBuilder("Today's Meetings", 0, this, R.layout.todaysmeeting);
        builder.process();
        break;
      case R.id.done:
        builder =
            new LastNMeetingViewBuilder(
                ("Last " + Constants.N + " Meetings"),
                1,
                this,
                R.layout.todaysmeeting,
                Constants.N);
        builder.process();
        break;
      case R.id.create:
        builder = new CreateMeetingViewBuilder("Create Meeting", 2, this, R.layout.createmeeting);
        builder.process();
        break;
    }

    return super.onOptionsItemSelected(item);
  }
Пример #2
0
 private void defaultViewToToday() {
   AbstractMeetingViewBuilder builder =
       new TodaysMeetingViewBuilder(("Today's Meetings"), 0, this, R.layout.todaysmeeting);
   builder.process();
 }