Last active
September 28, 2017 06:28
-
-
Save stephanenicolas/3df144a1be8aee7610c7a2e666a49e7f to your computer and use it in GitHub Desktop.
Invoke the listener method reference on the current activity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HeadLineFragment extends ListFragment { | |
@Override | |
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