Listview shows orange background when clicked
I'm using aListview of Imag开发者_运维问答es (Code is not necesary, it only shows FullScreen Images). The Listview is created dynamycally and I can't creat it on xml.
My problem comes when trying to click on an item. I dont want the orange flashy effect that it shows. Is there any way to evade the effect?
Changing background color of ListView items on Android
lv.setOnItemClickListener(new OnItemClickListener() {
@SuppressWarnings("deprecation")
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
LinearLayout layout=(LinearLayout) view.findViewById(R.id.listViewLayPerRow);
layout.setBackgroundColor(Color.YELLOW);
finish();
}
});
精彩评论