예제 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    eventList = EventFactory.generateDiverseEventList();
    iterator = new EventIterator(eventList);

    progressBar = (ProgressBar) findViewById(R.id.progressBar);
    progressBar.setMax(iterator.getSize() - 1);
    myText = (TextView) findViewById(R.id.m_description);
    myTitle = (TextView) findViewById(R.id.title);
    displayEvent(iterator.current());
  }
예제 #2
0
 public void updateProgressBar() {
   if (progressBar.getMax() > (iterator.getSize() - 1)) {
     progressBar.setMax(iterator.getSize() - 1);
   }
   progressBar.setProgress(iterator.getIndexNum());
 }