How to set Image source to a listView depending on database fill data
===

Basically what i'm trying to do is set dynamically a image source to a image view depending on the id that i get from a precreated database. this is my ListFragment:

    public class teamsListFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> {
    String[] teams;
    private SimpleCursorAdapter adapter; 
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		String[] projection = {DBAdapter.KEY_ROWID, DBAdapter.KEY_NAME};
		String[] uiBindFrom = {DBAdapter.KEY_NAME};
		int[] uiBindTo = {R.id.label};
		
		getLoaderManager().initLoader(0, null, this);
		adapter = new SimpleCursorAdapter(
				getActivity().getApplicationContext(), R.layout.team_row,
				null, uiBindFrom, uiBindTo, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
		adapter.setViewBinder(VIEW_BINDER);
		setListAdapter(adapter);
	}
	 static final SimpleCursorAdapter.ViewBinder VIEW_BINDER = new SimpleCursorAdapter.ViewBinder() {
    @Override
    public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
     if ( view.getId()!=R.id.icon) return false;
     ImageView teamIcon = (ImageView) view;
     int idTeam =   cursor.getInt(cursor.getColumnIndex(DBAdapter.KEY_ROWID));
     switch(idTeam) {
            case 1:
            	teamIcon.setImageResource(R.drawable.team1);
            break;
            case 2:
            	teamIcon.setImageResource(R.drawable.team2);
            break;
        }
	return true;
      }
    }; 
This is my teamrow.xml

    <ImageView
        android:id="@+id/icon"
        android:layout_width="30dp"
        android:layout_height="24dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
         />

    <TextView
        android:id="@+id/label"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:lines="1"
        android:text="@+id/TextView01"
        android:textSize="24dp" />

The problem is that it doesn't work the image source is not set. I think is the view binder but I'm new with android and i really appreciate if could show me my error or if there is a better way to achieve this. thanks in advance.