So I have a listView on Android which I create in code like so:
setListAdapter(new ArrayAdapter<String>(this, R.layout.menuitem, menuitems));
ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setBackgroundColor(Color.RED);
lv.setOnItemClickListener(new OnItemClickListener() { ... });
Is there a way to change the selection colour in code from the default orange colour to another one?
Take a look at: Android ListView Selector Color
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With