Skip to content

Instantly share code, notes, and snippets.

@clayallsopp
Created March 6, 2011 18:44
Show Gist options
  • Save clayallsopp/857527 to your computer and use it in GitHub Desktop.
Save clayallsopp/857527 to your computer and use it in GitHub Desktop.
BrocabAdapter stub 2
...
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
if (row == null) {
LayoutInflater inflater = LayoutInflater.from(this.getContext());
row = inflater.inflate(R.layout.list_item_with_disclosure,null);
ImageView disclosure = (ImageView)row.findViewById(R.id.disclosure);
disclosure.setImageResource(R.drawable.disclosure);
}
TextView label = (TextView)row.findViewById(R.id.term);
label.setText(this.getItem(position));
return row;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment