leanback/src/androidTest/java/androidx/leanback/app/RowsFragmentTest.java
Fragment waitPageFragment(final Class pageFragmentClass) {
            PollingCheck.waitFor(new PollingCheck.PollingCheckCondition() {
                @Override
                public boolean canProceed() {
                    return pageFragmentClass.isInstance(getMainFragment())
                            && getMainFragment().getView() != null;
                }
            });
            return getMainFragment();
        }
/**
         * Util to wait PageFragment swapped.
         */
Util to wait PageFragment swapped.
Util to wait PageFragment swapped .
Fragment waitPageFragment(final Class pageFragmentClass) {
            PollingCheck.waitFor(new PollingCheck.PollingCheckCondition() {
                @Override
                public boolean canProceed() {
                    return pageFragmentClass.isInstance(getMainFragment())
                            && getMainFragment().getView() != null;
                }
            });
            return getMainFragment();
        }
Fragment waitPageFragment ( final Class pageFragmentClass ) { PollingCheck . waitFor ( new PollingCheck . PollingCheckCondition ( ) { @ Override public boolean canProceed ( ) { return pageFragmentClass . isInstance ( getMainFragment ( ) ) && getMainFragment ( ) . getView ( ) != null ; } } ) ; return getMainFragment ( ) ; }
Util to wait PageFragment swapped.
Util to wait PageFragment swapped .