Skip to content

Instantly share code, notes, and snippets.

@daniellevass
Last active December 16, 2015 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniellevass/3a94aeddae2a98a39caa to your computer and use it in GitHub Desktop.
Save daniellevass/3a94aeddae2a98a39caa to your computer and use it in GitHub Desktop.
Reindeer ListView

#Making Reindeer ListViews

1. New Activity

Create a new blank activity - call it ReindeerListActivity

Imgur

2. Layout

Next ammend the layout to contain one listview only

Imgur

3. Row Layout

Create a new layout to recycle for each row - we want to have a picture and name of the reindeer

Imgur

4. Reindeer Object

Next we want to create a reindeer object with the following properties:

  • String - name
  • Integer - picture
  • String noise

Imgur

5. Activity java

Finally we can make our code do something = firstly we want to make a list of reindeers

Imgur

Then we want to make it so they get displayed

Imgur

Then we want to make it do something when we tap on a row

Imgur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment