I have found the answer...
I had to set the color and after that i had to setText too....
incomeAdapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
if (view.getId()==R.id.amountTextView)
{
int incOrExpIndex = cursor.getColumnIndex("incOrExp");
int incOrExp = cursor.getInt(incOrExpIndex);
switch(incOrExp) {
case 0:
TextView tv0 = (TextView)view;
tv0.setTextColor(Color.BLUE);
tv0.setText(cursor.getString(cursor.getColumnIndex("inAmount")));
break;
case 1:
TextView tv1 = (TextView)view;
tv1.setTextColor(Color.RED);
tv1.setText(cursor.getString(cursor.getColumnIndex("inAmount")));
break;
}
return true;
}
return false;}
});
I want to thank people who have tried to solve this problem...