Created
September 6, 2014 17:45
-
-
Save ejcer/c4a24dbd9fea6dd6bec7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.noteworthy; | |
import java.util.ArrayList; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.ListView; | |
public class CalendarActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_calendar); | |
ArrayList<Contributor> contributorList = new ArrayList<Contributor>(); | |
//contributorList.add(new Contributor("contributor1","Larry Page","Vector 101","2")) | |
ListView listView = (ListView) findViewById(R.id.contributorsList); | |
Contributor[] items = { | |
new Contributor(R.drawable.ic_launcher, "Larry Page","Vector 101", 2), | |
new Contributor(R.drawable.ic_launcher, "Dave Fontenot","Calculus", 4), | |
new Contributor(R.drawable.ic_launcher, "Alexis Ohanian","Data Structures", 5), | |
new Contributor(R.drawable.ic_launcher, "Almighty Gaben","Brewing Science", 3), | |
new Contributor(R.drawable.ic_launcher, "Buckwheat","Science Fiction", 2)}; | |
ArrayList<Contributor> cList = new ArrayList<Contributor>(); | |
for(int i = 0; i < items.length; i++) | |
{ | |
contributorList.add(items[i]); | |
} | |
ContributorAdapter adapter = new ContributorAdapter(this, cList); | |
listView.setAdapter(adapter); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment