Instantly share code, notes, and snippets.

What would you like to do?
Invoke the listener method reference on the current activity
public class HeadLineFragment extends ListFragment {
public void onListItemClick(ListView l, View v, int p, long i) {
// Send the event to the host activity
// we should probably check if the activity is finishing|destroyed|rotating
mCallback.onArticleSelected(getActivity(), p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment