@Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); // Get the item that was clicked PageModel o = adapter.getItem(position); String novel = o.toString(); // Create new intent Intent intent = new Intent(this, DisplayLightNovelDetailsActivity.class); intent.putExtra(Constants.EXTRA_NOVEL, novel); intent.putExtra(Constants.EXTRA_PAGE, o.getPage()); intent.putExtra(Constants.EXTRA_TITLE, o.getTitle()); intent.putExtra( Constants.EXTRA_ONLY_WATCHED, getIntent().getBooleanExtra(Constants.EXTRA_ONLY_WATCHED, false)); startActivity(intent); Log.d("DisplayLightNovelsActivity", o.getPage() + " (" + o.getTitle() + ")"); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); // Get the item that was clicked PageModel o = adapter.getItem(position); String novel = o.toString(); // Create a bundle containing information about the novel that is clicked Bundle bundle = new Bundle(); bundle.putString(Constants.EXTRA_NOVEL, novel); bundle.putString(Constants.EXTRA_PAGE, o.getPage()); bundle.putString(Constants.EXTRA_TITLE, o.getTitle()); bundle.putBoolean( Constants.EXTRA_ONLY_WATCHED, getSherlockActivity().getIntent().getBooleanExtra(Constants.EXTRA_ONLY_WATCHED, false)); mFragListener.changeNextFragment(bundle); Log.d("DisplayLightNovelsActivity", o.getPage() + " (" + o.getTitle() + ")"); // Need to send it through }