I have a ListView
with custom rows. They have different background colors, set ind the getView()
method of an ArrayAdapter
:
public View getView(int position, View convertView, ViewGroup parent) {
...
bgResourceId = R.color.white;
if (items.get(position).status.contentEquals("ok")) {
bgResourceId = R.color.green;
} else items.get(position).status.contentEquals("error")) {
bgResourceId = R.color.red;
}
row.setBackgroundResource(bgResourceId);
return row;
}
Clicking on a row launches a new Activity. After finishing the new Actvity, we return to the Activity with the ListView
and at his point I need to highlight one of the rows.
Inside the onResume()
method, NOT after touching or clicking the row.
I do know which row (index) will get highlihgted.
Just a simple animation - maybe blink for one second, and after that, return to its original background color. Something like this:
Is that possible?