Skip to content

Instantly share code, notes, and snippets.

@naanT
Created August 21, 2015 02:08
Show Gist options
  • Save naanT/62359ccc04625c5a7c87 to your computer and use it in GitHub Desktop.
Save naanT/62359ccc04625c5a7c87 to your computer and use it in GitHub Desktop.
onitemclicklistener listview android
forecastListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String forecastValue= (String) parent.getItemAtPosition(position);
Toast.makeText(getActivity(),forecastValue,Toast.LENGTH_LONG).show();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment