Skip to content

Instantly share code, notes, and snippets.

@sudar
Created September 17, 2010 16:41
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 sudar/584498 to your computer and use it in GitHub Desktop.
Save sudar/584498 to your computer and use it in GitHub Desktop.
setListAdapter(new ArrayAdapter<string>(this, R.layout.list_item, strings) {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row;
if (null == convertView) {
row = mInflater.inflate(R.layout.list_item, null);
} else {
row = convertView;
}
TextView tv = (TextView) row.findViewById(android.R.id.text1);
tv.setText(getItem(position));
return row;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment