Created
February 9, 2015 04:54
-
-
Save rajohns08/016aad798a05f04ccaf9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends ActionBarActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ListView listView = (ListView)findViewById(R.id.listView); | |
Person john = new Person("John", "123 Fake Dr."); | |
Person jane = new Person("Jane", "456 Unreal Ln."); | |
Person james = new Person("James", "789 Notreal Circle"); | |
Person sally = new Person("Sally", "147 Seashell Place"); | |
Person mario = new Person("Mario", "135 Bayside Ct."); | |
Person luigi = new Person("Luigi", "246 Bowser Castle"); | |
Person peach = new Person("Peach", "7911 Peach St."); | |
Person toad = new Person("Toad", "81012 Blue Blvd"); | |
ArrayList<Object> people = new ArrayList<>(); | |
people.add("Real People"); | |
people.add(john); | |
people.add(jane); | |
people.add(james); | |
people.add(sally); | |
people.add("Fake People"); | |
people.add(mario); | |
people.add(luigi); | |
people.add(peach); | |
people.add(toad); | |
listView.setAdapter(new PersonAdapter(this, people)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment