private void showBlogPostView(boolean show) { if (this.isWideScreen) { return; } if (show) { this.exampleMainContent.setVisibility(View.INVISIBLE); this.selectedBlogPostView.setVisibility(View.VISIBLE); actionModeTitleView.setText(""); long id = adapter.getCurrentItemId(); int position = adapter.getPosition(id); getActivity().startActionMode(new BlogPostViewCallback(position)); } else { this.exampleMainContent.setVisibility(View.VISIBLE); this.selectedBlogPostView.setVisibility(View.GONE); } }
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (listView == null) { return; } adapter.clearFilterDescriptors(); ArrayList<BlogPost> allItems = getItems(); outState.putParcelableArrayList("allItems", allItems); outState.putBoolean("isInReorder", reorderBehavior.isInProgress()); outState.putBoolean("isAllSelected", menuSelection == menuItemAll); outState.putLong("currentItemId", adapter.getCurrentItemId()); outState.putBoolean( "isFullScreen", !isWideScreen && exampleMainContent.getVisibility() != View.VISIBLE); }