Consider the following combo list
comboList = new Spinner(this);
list_arr = new ArrayList<String>();
The ArrayList is filled with Strings from SharedPreferences and the Spinner is populated in this way
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, list_arr);
comboList.setAdapter(dataAdapter);
Then it gets updated in case of an event OnClickListener()
list_arr.clear();
ArrayList<String> res = getMyLists();
for (int i = 0; i < res.size(); i++) {
list_arr.add(res.get(i));
}
How can I refresh also the already selected item programmatically? From the GUI, I have to manually select another value from the list and then change it back.
This could be a duplicate of this other question but it is very old and unanswered.