Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

onLongClickListener never get trigered

I have a custom listView defined like this

public class DDListView extends ListView implements OnScrollChangedListener {

than I make an instance of it with name mExampleList I set onLongClickListener but it never get called, where is my problem ?

mExampleList.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            // TODO Auto-generated method stub
            Log.v("vvv", "sdfsdf");
            return false;
        }
    });
like image 372
Lukap Avatar asked Sep 30 '11 14:09

Lukap


1 Answers

I think you want to be using OnItemLongClickListener instead of OnClickListener.

like image 67
ahodder Avatar answered Sep 22 '22 09:09

ahodder