0

Why click Listview doesn't work? I created a listview with an array adapter but the click line in the list view doesn't work.

mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                            @Override
                            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                                Toast.makeText(Listedesarticles.this, "List item was clicked at " + position, Toast.LENGTH_SHORT).show();
                            }
                        });
Cardstdani
  • 4,999
  • 3
  • 12
  • 31
saloumé
  • 13
  • 6

1 Answers1

0

i think this problem cause maybe:

  1. your xml disabled ListView
  2. ListView item layout has set setOnClickListener
  3. your ListView's parent has intercepted touch event
Neo Chen
  • 41
  • 3