Wednesday, 17 October 2012

ANDROID - ListView Selected Listener




Selected Listener:

lvList.setOnItemSelectedListener(new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(),
"U selected.." + str[arg2], 5000).show();

}

@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub

}
});


No comments:

Post a Comment