Android Open Source - Assignment1 Home Screen






From Project

Back to project page Assignment1.

License

The source code is released under:

GNU General Public License

If you think the Android project Assignment1 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.kwicento_count;
/* ww  w .  ja  v  a  2 s.  co m*/
import java.util.ArrayList;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class HomeScreen extends Activity {
  
  protected ArrayList <Counter> counterList;
  protected static CounterListModel newModel;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_counter_screen);
    newModel = new CounterListModel();
    ArrayList<Counter> currentList =  newModel.getCurrentCounters();
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.counter_screen, menu);
    
    return true;
  }
  

  public void createCounter(View view) {
      // Do something in response to button
    Intent intent = new Intent(this, CreatingNewCounter.class);
    startActivity(intent);
  }
  
  public void gotoCounterList(View view) {
      // Do something in response to button
    Intent navi = new Intent(this, CounterListScreen.class);
    startActivity(navi);
  }
  
  public static CounterListModel getNewModel() {
    return newModel;
  }

  public void setNewModel(CounterListModel newModel) {
    this.newModel = newModel;
  }

}




Java Source Code List

com.example.kwicento_count.CounterListModel.java
com.example.kwicento_count.CounterListScreen.java
com.example.kwicento_count.CounterScreen.java
com.example.kwicento_count.Counter.java
com.example.kwicento_count.Counts.java
com.example.kwicento_count.CreatingNewCounter.java
com.example.kwicento_count.EditingCounterScreen.java
com.example.kwicento_count.HomeScreen.java
com.example.kwicento_count.Serialization.java