Skip to content

Instantly share code, notes, and snippets.

@SelvinPL
Created August 6, 2015 10:56
Show Gist options
  • Select an option

  • Save SelvinPL/9b514a4842f547ddefb2 to your computer and use it in GitHub Desktop.

Select an option

Save SelvinPL/9b514a4842f547ddefb2 to your computer and use it in GitHub Desktop.
SimpleAdapter adapter = ...;
adapter.setViewBinder(new SimpleAdapter.ViewBinder() {
@Override
public boolean setViewValue(View view, Object data, String textRepresentation) {
if(view.getId() == R.id.imageView1) { //view is our ImageView
((ImageView)view).setImageBitmap((Bitmap)data);
return true;
}
//Otherwise do default stuff
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment