Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.noteworthy;
import java.util.ArrayList;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class ContributorAdapter extends ArrayAdapter<Contributor> {
ArrayList<Contributor> contributors;
public ContributorAdapter(Context context, int calendarListItem, ArrayList<Contributor> contributors) {
super(context, calendarListItem, contributors);
this.contributors = contributors;
public Contributor getItem(int position) {
// TODO Auto-generated method stub
return contributors.get(position);
// @Override
// public int getCount(){
// Log.d("pls show", "go sendgrid");
// return 4;
// }
public View getView(int position, View convertView, ViewGroup parent) {
Contributor contributor = getItem(position);
Log.d("pos", position+"");
// Check if an existing view is being reused, otherwise inflate the view
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.calendarlist_item, parent, false);
// Lookup view for data population
TextView cName = (TextView) convertView.findViewById(;
TextView cCon = (TextView) convertView.findViewById(;
ImageView cPic = (ImageView) convertView.findViewById(;
// Populate the data into the template view using the data object
// Return the completed view to render on screen
return convertView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.