내가 짝수 행의 배경 색상을 표시하기 위해 다음과 같은 사용자 정의 SimpleCursorAdapter
클래스를 썼다 분실 :의 ListView 안드로이드 기본 애니메이션
public class AlternateRowCursorAdapter extends SimpleCursorAdapter {
private int[] colors = new int[] { Color.parseColor("#FFFFFF"),
Color.parseColor("#EEEEEE") };
public AlternateRowCursorAdapter(Context context, int layout, Cursor c,
String[] from, int[] to) {
super(context, layout, c, from, to);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
super.bindView(view, context, cursor);
int colorPos = cursor.getPosition() % colors.length;
view.setBackgroundColor(colors[colorPos]);
}
}
그것은 잘 작동하지만 안드로이드 기본 애니메이션 (녹색 배경이에 도청 동안 항목)가 손실됩니다. 기본 애니메이션을 되 찾을 수있는 방법이 있습니까? 미리 감사드립니다.
왜 삭제 중 다시 질문을 게시? http://stackoverflow.com/questions/13693062/custom-simplecursoradapter-without-default-animation – Selvin