List<Integer> values;
String[] mListContent={"Sunday", "Monday", "Tuesday", "Wedneday", "Thursday", "Friday", "Saturday"};
Intent myIntent = getIntent();
iid = myIntent.getExtras().getLong("curr_id");
values = datasource.getDays(iid);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.simple_selectable_list_item, mListContent);
setListAdapter(adapter);
ListView listView = getListView();
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
for(ii=0; ii<values.size(); ii++)
{
listView.setItemChecked(values.get(ii),true);
Log.i(" values: " + values.get(ii)," ");
}
I have a file named textcolorselector.xml for list, that goes
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#000" />
<item android:state_checked="true" android:color="#000" />
<item android:state_active="true" android:color="#000" />
<item android:state_selected="true" android:color="#000" />
<item android:color="#888" />
</selector>
say like i have 7 defaut rows in my list and wanna highlight only certain positions
the values from the database are retreived perfectly,in the database i have saved only the position values of the list ie 0,1,...6 for sunday, monday,...saturday respectively, the problem is extracting values of "values" list is not being changed as set.