コード例 #1
0
ファイル: RollInfo.java プロジェクト: Gelassen/congress
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list_titled_fastscroll);

    inflater = LayoutInflater.from(this);

    database = new Database(this);
    database.open();
    peopleCursor = database.getLegislators();
    startManagingCursor(peopleCursor);

    Bundle extras = getIntent().getExtras();
    id = extras.getString("id");
    roll = (Roll) extras.getSerializable("roll");

    setupControls();

    RollInfoHolder holder = (RollInfoHolder) getLastNonConfigurationInstance();
    if (holder != null) {
      this.loadRollTask = holder.loadRollTask;
      this.roll = holder.roll;
      this.loadVotersTask = holder.loadVotersTask;
      this.voters = holder.voters;
      this.loadPhotoTasks = holder.loadPhotoTasks;
      this.currentTab = holder.currentTab;
      this.tracked = holder.tracked;

      if (loadPhotoTasks != null) {
        Iterator<LoadPhotoTask> iterator = loadPhotoTasks.values().iterator();
        while (iterator.hasNext()) iterator.next().onScreenLoad(this);
      }
    }

    tracker = Analytics.start(this);
    if (!tracked) {
      Analytics.page(this, tracker, "/vote/roll/" + id);
      tracked = true;
    }

    loadRoll();
  }
コード例 #2
0
ファイル: RollInfo.java プロジェクト: Gelassen/congress
 @Override
 protected void onDestroy() {
   super.onDestroy();
   database.close();
   Analytics.stop(tracker);
 }
コード例 #3
0
 @Override
 public void onDetach() {
   super.onDetach();
   Analytics.stop(tracker);
 }