private void loadSessionDetail(Uri sessionUri) { BeamUtils.setBeamSessionUri(this, sessionUri); SessionDetailFragment fragment = new SessionDetailFragment(); fragment.setArguments( BaseActivity.intentToFragmentArguments(new Intent(Intent.ACTION_VIEW, sessionUri))); getSupportFragmentManager() .beginTransaction() .replace(R.id.fragment_container_detail, fragment) .commit(); mDetailFragment = fragment; updateDetailBackground(); // If loading session details in portrait, hide the master pane mSlidingPaneLayout.closePane(); }
@Override protected void onCreate(Bundle savedInstanceState) { UIUtils.tryTranslateHttpIntent(this); BeamUtils.tryUpdateIntentFromBeam(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_sessions_sandbox); final FragmentManager fm = getSupportFragmentManager(); mTracksDropdownFragment = (TracksDropdownFragment) fm.findFragmentById(R.id.fragment_tracks_dropdown); mSlidingPaneLayout = (SlidingPaneLayout) findViewById(R.id.sliding_pane_layout); // Offset the left pane by its full width and left margin when collapsed // (ViewPager-like presentation) mSlidingPaneLayout.setParallaxDistance( getResources().getDimensionPixelSize(R.dimen.sliding_pane_width) + getResources().getDimensionPixelSize(R.dimen.multipane_padding)); mSlidingPaneLayout.setSliderFadeColor( getResources().getColor(R.color.sliding_pane_content_fade)); routeIntent(getIntent(), savedInstanceState != null); if (savedInstanceState != null) { if (mFullUI) { int viewType = savedInstanceState.getInt(STATE_VIEW_TYPE); getSupportActionBar().setSelectedNavigationItem(viewType); } mDetailFragment = fm.findFragmentById(R.id.fragment_container_detail); updateDetailBackground(); } // This flag prevents onTabSelected from triggering extra master pane reloads // unless it's actually being triggered by the user (and not automatically by // the system) mInitialTabSelect = false; mImageLoader = new ImageLoader(this, R.drawable.person_image_empty) .setMaxImageSize(getResources().getDimensionPixelSize(R.dimen.speaker_image_size)) .setFadeInImage(UIUtils.hasHoneycombMR1()); EasyTracker.getInstance().setContext(this); }