Change ListView selected colour on Android
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
精彩评论