I am trying to select an item in a listview and show the user the item he selected but when I click the list item nothing happens.
songtitle is a ListArray….
ArrayList<String>songtitle = new ArrayList<String>();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.song,songtitle);
setListAdapter(adapter);
This part above is a summary, not actual code. That part works. It is the method below that doesn’t.
protected void onListIemClick(ListView , View v, int position, long id){
super.onListItemClick(c, v, position, id);
Toast.makeText(this, "You have chosen the color: " + " " + songtitle, Toast.LENGTH_LONG).show();
}
Your method name above is misspelled, which you can verify in your app by adding the @Override annotation.
Are you using custom views?