ManuelPeinado/FadingActionBar

How may I use the setOnItemClickListener?

Mardoqueu opened this issue · 0 comments

I am trying to use the setOnItemClickListener, but it is not working, any tips?

    mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
            switch (i) {
                case 0:
                    Context context = getApplicationContext();
                    CharSequence text = "It is working!";
                    int duration = Toast.LENGTH_SHORT;

                    Toast toast = Toast.makeText(context, text, duration);
                    toast.show();
                    break;
            }
        }
    });