У меня есть ListView, в котором перечислены вакансии в моем приложении для Android. Я хочу раскрасить строки в соответствии с их типом работы. Ниже приведен код, который я использую для настройки Listview.
startManagingCursor(cursor);
adapter = new SimpleCursorAdapter(this, R.layout.menu_item, cursor, FROM, TO);
menuList.setAdapter(adapter);
Ниже приведен макет XML для элементов Listview.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="10sp">
<TextView
android:id="@+id/rowid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/exhibitor_header" />
<TextView
android:id="@+id/rowidtwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/listview_background"
android:layout_below="@+id/rowid"/>
</RelativeLayout>
Как настроить ListView для отображения каждой строки в цвете, относящемся к ее категории работы. Могу ли я сделать это без использования специального адаптера?