Skip to content Skip to sidebar Skip to footer

Using Setonitemclicklistener For Items In Listview

I have got an app that saves audio on sd card. I've created a listview which retrieves the filesnames from the sdcard. I'm trying to set a listener so when the file name is clicked

Solution 1:

list.setOnItemClickListener( new OnItemClickListener() {
    publicvoidonItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
        Intent i = new Intent(ClassName.this,CourtDetailActivity.class);
        startActivity(i);
    });
}

this is the code is properly working I think you do not import blow Package

import android.widget.AdapterView.OnItemClickListener;

put this line to import section of the application

Solution 2:

Post a Comment for "Using Setonitemclicklistener For Items In Listview"