-9

I have no idea how to set a onclicklistener for a item in listview. I tried to find some samples or ask someone but nothing worked.

Can anybody help me?

threxx
  • 1,213
  • 1
  • 31
  • 59
  • Please provide some of what you have tried, and what context you need to create one. – David Sep 10 '15 at 14:11
  • 2
    Do a simple google/stackoverflow search before asking such a basic question. The internet is full of ListView examples and your answer is already here: http://stackoverflow.com/questions/2468100/android-listview-click-howto – Frank D. Sep 10 '15 at 14:13
  • `Can anybody help me?` **Yes**. Google can. – Phantômaxx Sep 10 '15 at 14:39

1 Answers1

0
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                //clickItemLogic();

            }
        });
Android Android
  • 724
  • 1
  • 7
  • 20