0

I'm using aListview of Images (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?

J-Rou
  • 2,216
  • 8
  • 32
  • 39

2 Answers2

0

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();
        }
    });
Hasan Masud
  • 982
  • 9
  • 17
0

Changing background color of ListView items on Android

Community
  • 1
  • 1
Tosa
  • 658
  • 5
  • 15
  • Thank you, i just found another solution, but since it's verry similar to this one, i'll accept the ansew. Thank you verry much for your time. – J-Rou Apr 27 '11 at 20:39
  • my solution was: `ListView list = (ListView) findViewById(R.id.listView1); list.setSelector(this.getResources().getDrawable(R.drawable.transparentpng10x10)); list.setAdapter(new HoizontalGalleryAdapter(createFavories()));` where transparentpng10x10 is a transparent png. – J-Rou Apr 27 '11 at 20:39