@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.item_pause_on_scroll: pauseOnScroll = !pauseOnScroll; item.setChecked(pauseOnScroll); applyScrollListener(); return true; case R.id.item_pause_on_fling: pauseOnFling = !pauseOnFling; item.setChecked(pauseOnFling); applyScrollListener(); return true; default: return super.onOptionsItemSelected(item); } }
protected void startImagePagerActivity(int position) { Intent intent = new Intent(getActivity(), SimpleImageActivity.class); intent.putExtra(Constants.Extra.FRAGMENT_INDEX, ImagePagerFragment.INDEX); intent.putExtra(Constants.Extra.IMAGE_POSITION, position); startActivity(intent); }
@Override public void onDestroy() { super.onDestroy(); AnimateFirstDisplayListener.displayedImages.clear(); }
protected void startImagePagerActivity(int position) { Intent intent = new Intent(getActivity(), SimpleImageActivity.class); intent.putExtra(Constants.Extra.FRAGMENT_INDEX, ImagePagerFragment.INDEX); intent.putExtra(Constants.Extra.IMAGE_POSITION, position); startActivity(intent); }
@Override public void onResume() { super.onResume(); applyScrollListener(); }
@Override public void onDestroy() { super.onDestroy(); AnimateFirstDisplayListener.displayedImages.clear(); }
@Override public void onResume() { super.onResume(); applyScrollListener(); }
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.item_pause_on_scroll: pauseOnScroll = !pauseOnScroll; item.setChecked(pauseOnScroll); applyScrollListener(); return true; case R.id.item_pause_on_fling: pauseOnFling = !pauseOnFling; item.setChecked(pauseOnFling); applyScrollListener(); return true; default: return super.onOptionsItemSelected(item); } }