Skip to content

Instantly share code, notes, and snippets.

@stephanenicolas
Created September 26, 2017 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephanenicolas/14f792c1b01069537fcf1dcc35ab0d8e to your computer and use it in GitHub Desktop.
Save stephanenicolas/14f792c1b01069537fcf1dcc35ab0d8e to your computer and use it in GitHub Desktop.
Good Old Way: MainActivity
public static class MainActivity extends Activity
implements HeadlinesFragment.HeadlineListener{
...
public void onArticleSelected(int position) {
// The user selected the headline of an article from the HeadlinesFragment
// Do something here to display that article
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment