开发者

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();
        }
    });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜