tomokiの備忘録

ITに関する簡単な備忘録です

【Android】SimpleCursorAdapterのレイアウトをいじる

今回の内容

SimpleCursorAdapterのレイアウトを項目ごとに変更する。

 解決方法

親となるClassにSimpleCursorAdapter.ViewBinderをimplementsします。

public boolean setViewValue(View view, Cursor cursor, int columnIndex) を定義し、その中で行いたいレイアウトの変更などを行います。

[例]

SimpleCursorAdapter_Sample