@Test public void switchToVideoBackToQuit() { final SingleSupportFragmentTestActivity activity = launchAndWaitActivity(DetailsSupportFragmentSwitchToVideoInOnCreate.class, new Options().uiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN), 0); final DetailsSupportFragmentSwitchToVideoInOnCreate detailsFragment = (DetailsSupportFragmentSwitchToVideoInOnCreate) activity.getTestFragment(); assertEquals(StateMachine.STATUS_INVOKED, detailsFragment.STATE_ENTER_TRANSITION_COMPLETE.getStatus()); assertNull(TransitionHelper.getEnterTransition(activity.getWindow())); assertEquals(0, getCoverDrawableAlpha(detailsFragment.mDetailsBackgroundController)); assertTrue(detailsFragment.getRowsSupportFragment().getView().hasFocus()); assertFalse(detailsFragment.isShowingTitle()); SystemClock.sleep(1000); assertNull(detailsFragment.mVideoSupportFragment); InstrumentationRegistry.getInstrumentation().runOnMainSync( new Runnable() { @Override public void run() { final MediaPlayerGlue glue = new MediaPlayerGlue(activity); detailsFragment.mDetailsBackgroundController.setupVideoPlayback(glue); glue.setMode(MediaPlayerGlue.REPEAT_ALL); glue.setArtist("A Googleer"); glue.setTitle("Diving with Sharks"); glue.setMediaSource(Uri.parse( "android.resource: } } ); PollingCheck.waitFor(4000, new PollingCheck.PollingCheckCondition() { @Override public boolean canProceed() { return detailsFragment.mVideoSupportFragment != null && detailsFragment.mVideoSupportFragment.getView() != null && detailsFragment.mVideoSupportFragment.getView().hasFocus(); } }); PollingCheck.waitFor(8000, new PollingCheck.PollingCheckCondition() { @Override public boolean canProceed() { return ((PlaybackSupportFragment) detailsFragment.mVideoSupportFragment).mBgAlpha == 0; } }); sendKeys(KeyEvent.KEYCODE_BACK); PollingCheck.waitFor(4000, new PollingCheck.ActivityDestroy(activity)); }
public RowsSupportFragment getRowsSupportFragment() { return mRowsSupportFragment; }
DetailsSupportFragment extends BaseSupportFragment { public RowsSupportFragment getRowsSupportFragment() { return mRowsSupportFragment; } }
DetailsSupportFragment extends BaseSupportFragment { public RowsSupportFragment getRowsSupportFragment() { return mRowsSupportFragment; }  }
DetailsSupportFragment extends BaseSupportFragment { public RowsSupportFragment getRowsSupportFragment() { return mRowsSupportFragment; }  void setAdapter(ObjectAdapter adapter); ObjectAdapter getAdapter(); void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener); void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener); BaseOnItemViewClickedListener getOnItemViewClickedListener(); @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState); @Override View onInflateTitleView(LayoutInflater inflater, ViewGroup parent,
                                   Bundle savedInstanceState); RowsSupportFragment getRowsSupportFragment(); void setSelectedPosition(int position); void setSelectedPosition(int position, boolean smooth); @Override void onStop(); @Override void onStart(); DetailsParallax getParallax(); }
DetailsSupportFragment extends BaseSupportFragment { public RowsSupportFragment getRowsSupportFragment() { return mRowsSupportFragment; }  void setAdapter(ObjectAdapter adapter); ObjectAdapter getAdapter(); void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener); void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener); BaseOnItemViewClickedListener getOnItemViewClickedListener(); @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState); @Override View onInflateTitleView(LayoutInflater inflater, ViewGroup parent,
                                   Bundle savedInstanceState); RowsSupportFragment getRowsSupportFragment(); void setSelectedPosition(int position); void setSelectedPosition(int position, boolean smooth); @Override void onStop(); @Override void onStart(); DetailsParallax getParallax();  }