/frameworks/support/fragment/src/androidTest/java/androidx/fragment/app/ |
D | FragmentReorderingTest.java | 63 final CountCallsFragment fragment1 = new CountCallsFragment(); in addReplace() local 69 .add(R.id.fragmentContainer, fragment1) in addReplace() 81 assertEquals(0, fragment1.onCreateViewCount); in addReplace() 100 final CountCallsFragment fragment1 = new CountCallsFragment(); in startWithPop() local 102 .add(R.id.fragmentContainer, fragment1) in startWithPop() 108 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 116 .add(R.id.fragmentContainer, fragment1) in startWithPop() 123 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 124 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() 128 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() [all …]
|
D | FragmentTransitionTest.java | 142 TransitionFragment fragment1 = setupInitialFragment(); in sharedElement() local 148 verifyTransition(fragment1, fragment2, "blueSquare"); in sharedElement() 151 verifyPopTransition(1, fragment2, fragment1); in sharedElement() 157 TransitionFragment fragment1 = setupInitialFragment(); in intermediateFragment() local 162 verifyTransition(fragment1, fragment2, "shared"); in intermediateFragment() 170 verifyPopTransition(2, fragment3, fragment1, fragment2); in intermediateFragment() 176 final TransitionFragment fragment1 = setupInitialFragment(); in removeAdded() local 190 .replace(R.id.fragmentContainer, fragment1) in removeAdded() 203 verifyAndClearTransition(fragment1.exitTransition, null, startBlue, startGreen); in removeAdded() 205 verifyNoOtherTransitions(fragment1); in removeAdded() [all …]
|
D | PostponedTransitionTest.java | 119 final TransitionFragment fragment1 = new TransitionFragment2(); in backStackNestingLevel() local 122 .replace(R.id.fragmentContainer, fragment1) in backStackNestingLevel() 128 assertForwardTransition(mBeginningFragment, fragment1); in backStackNestingLevel() 133 assertPostponedTransition(fragment1, mBeginningFragment, null); in backStackNestingLevel() 139 assertBackTransition(fragment1, mBeginningFragment); in backStackNestingLevel() 338 TransitionFragment fragment1 = new PostponedFragment1(); in differentContainers() local 342 .add(R.id.fragmentContainer1, fragment1) in differentContainers() 347 fragment1.startPostponedEnterTransition(); in differentContainers() 349 fragment1.waitForTransition(); in differentContainers() 351 clearTargets(fragment1); in differentContainers() [all …]
|
D | FragmentViewTests.java | 69 final StrictViewFragment fragment1 = new StrictViewFragment(); in addFragments() local 70 fm.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in addFragments() 72 FragmentTestUtil.assertChildren(container, fragment1); in addFragments() 78 FragmentTestUtil.assertChildren(container, fragment1, fragment2); in addFragments() 89 FragmentTestUtil.assertChildren(container, fragment1, fragment2, fragment3, fragment4); in addFragments() 93 FragmentTestUtil.assertChildren(container, fragment1, fragment2); in addFragments() 98 FragmentTestUtil.assertChildren(container, fragment1); in addFragments() 116 final StrictViewFragment fragment1 = new StrictViewFragment(); in addTwoContainers() local 117 fm.beginTransaction().add(R.id.fragmentContainer1, fragment1).addToBackStack(null).commit(); in addTwoContainers() 119 FragmentTestUtil.assertChildren(container1, fragment1); in addTwoContainers() [all …]
|
D | FragmentAnimationTest.java | 202 final AnimatorFragment fragment1 = new AnimatorFragment(); in replaceAnimators() local 205 .add(R.id.fragmentContainer, fragment1, "1") in replaceAnimators() 218 assertFragmentAnimation(fragment1, 1, false, EXIT); in replaceAnimators() 228 int expectedAnimations = replacement1 == fragment1 ? 2 : 1; in replaceAnimators() 283 final AnimatorFragment fragment1 = new AnimatorFragment(); in postponedAddRemove() local 285 .add(R.id.fragmentContainer, fragment1) in postponedAddRemove() 304 assertNotNull(fragment1.getView()); in postponedAddRemove() 305 assertEquals(View.VISIBLE, fragment1.getView().getVisibility()); in postponedAddRemove() 306 assertEquals(1f, fragment1.getView().getAlpha(), 0f); in postponedAddRemove() 307 assertTrue(ViewCompat.isAttachedToWindow(fragment1.getView())); in postponedAddRemove() [all …]
|
D | FragmentTransactionTest.java | 188 final OnGetLayoutInflaterFragment fragment1 = new OnGetLayoutInflaterFragment(); in testGetLayoutInflater() 189 assertEquals(0, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 191 .add(R.id.content, fragment1) in testGetLayoutInflater() 195 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 196 assertEquals(fragment1.layoutInflater, fragment1.getLayoutInflater()); in testGetLayoutInflater() 198 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 200 LayoutInflater layoutInflater = fragment1.layoutInflater; in testGetLayoutInflater() 209 assertSame(layoutInflater, fragment1.getLayoutInflater()); in testGetLayoutInflater() 210 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 214 assertNotSame(layoutInflater, fragment1.getLayoutInflater()); in testGetLayoutInflater() [all …]
|
D | ViewModelTest.java | 84 ViewModelFragment fragment1 = getFragment(viewModelActivity[0], in testSameActivityViewModels() 88 assertThat(fragment1, notNullValue()); in testSameActivityViewModels() 91 assertThat(fragment1.activityModel, is(activityModel[0])); in testSameActivityViewModels() 94 assertThat(fragment1.defaultActivityModel, is(defaultActivityModel[0])); in testSameActivityViewModels() 106 ViewModelFragment fragment1 = getFragment(viewModelActivity[0], in testSameActivityViewModels() 110 assertThat(fragment1, notNullValue()); in testSameActivityViewModels() 113 assertThat(fragment1.activityModel, is(activityModel[0])); in testSameActivityViewModels() 116 assertThat(fragment1.defaultActivityModel, is(defaultActivityModel[0])); in testSameActivityViewModels() 131 ViewModelFragment fragment1 = getFragment(viewModelActivity[0], in testSameFragmentViewModels() 135 assertThat(fragment1, notNullValue()); in testSameFragmentViewModels() [all …]
|
D | FragmentAnimatorTest.java | 286 final AnimatorFragment fragment1 = new AnimatorFragment(); in replaceAnimators() local 289 .add(R.id.fragmentContainer, fragment1, "1") in replaceAnimators() 304 assertFragmentAnimation(fragment1, 1, false, EXIT); in replaceAnimators() 314 int expectedAnimations = replacement1 == fragment1 ? 2 : 1; in replaceAnimators() 373 final AnimatorFragment fragment1 = new AnimatorFragment(); in postponedAddRemove() local 375 .add(R.id.fragmentContainer, fragment1) in postponedAddRemove() 394 assertNotNull(fragment1.getView()); in postponedAddRemove() 395 assertEquals(View.VISIBLE, fragment1.getView().getVisibility()); in postponedAddRemove() 396 assertEquals(1f, fragment1.getView().getAlpha(), 0f); in postponedAddRemove() 397 assertTrue(ViewCompat.isAttachedToWindow(fragment1.getView())); in postponedAddRemove() [all …]
|
D | FragmentLifecycleTest.java | 723 StrictFragment fragment1 = (StrictFragment) fm.findFragmentByTag("1"); in noPrematureStateChange() local 725 assertFalse(fragment1.mCalledOnResume); in noPrematureStateChange() 973 Fragment fragment1 = new StrictFragment(); in restoreNonConfig() local 975 .add(fragment1, "1") in restoreNonConfig() 981 fragment2.setTargetFragment(fragment1, 0); in restoreNonConfig() 984 .remove(fragment1) in restoreNonConfig() 1019 Fragment fragment1 = new StrictFragment(); in retainedFragmentInBackstack() local 1021 .add(fragment1, "1") in retainedFragmentInBackstack() 1028 fragment1.getChildFragmentManager().beginTransaction() in retainedFragmentInBackstack() 1030 fragment1.getChildFragmentManager().executePendingTransactions(); in retainedFragmentInBackstack() [all …]
|
D | FragmentTest.java | 67 OrderFragment fragment1 = new OrderFragment(); in testOnCreateOrder() local 71 .add(R.id.content, fragment1) in testOnCreateOrder() 74 assertEquals(0, fragment1.createOrder); in testOnCreateOrder()
|
/frameworks/support/transition/src/androidTest/java/androidx/transition/ |
D | FragmentTransitionTest.java | 68 final TransitionFragment fragment1 = TransitionFragment.newInstance(R.layout.scene2); in preconditions() local 70 showFragment(fragment1, false, null); in preconditions() 71 assertNull(fragment1.mRed); in preconditions() 72 assertNotNull(fragment1.mGreen); in preconditions() 73 assertNotNull(fragment1.mBlue); in preconditions() 74 showFragment(fragment2, true, new Pair<>(fragment1.mGreen, "green")); in preconditions() 82 final TransitionFragment fragment1 = TransitionFragment.newInstance(R.layout.scene2); in nonSharedTransition() local 84 showFragment(fragment1, false, null); in nonSharedTransition() 86 verify(fragment1.mListeners.get(TransitionFragment.TRANSITION_EXIT)) in nonSharedTransition() 88 verify(fragment1.mListeners.get(TransitionFragment.TRANSITION_EXIT), timeout(3000)) in nonSharedTransition() [all …]
|
/frameworks/support/lifecycle/extensions/src/androidTest/java/androidx/lifecycle/ |
D | ViewModelTest.java | 67 ViewModelFragment fragment1 = getFragment(viewModelActivity[0], in ensureSameViewHolders() 71 assertThat(fragment1, notNullValue()); in ensureSameViewHolders() 73 assertThat(fragment1.activityModel, is(fragment2.activityModel)); in ensureSameViewHolders() 74 assertThat(fragment1.fragmentModel, not(is(fragment2.activityModel))); in ensureSameViewHolders() 75 assertThat(mActivityRule.getActivity().activityModel, is(fragment1.activityModel)); in ensureSameViewHolders() 79 fragment1Model[0] = fragment1.fragmentModel; in ensureSameViewHolders() 87 ViewModelFragment fragment1 = getFragment(viewModelActivity[0], in ensureSameViewHolders() 91 assertThat(fragment1, notNullValue()); in ensureSameViewHolders() 94 assertThat(fragment1.activityModel, is(activityModel[0])); in ensureSameViewHolders() 96 assertThat(fragment1.fragmentModel, is(fragment1Model[0])); in ensureSameViewHolders() [all …]
|
D | FragmentOperationsLifecycleTest.java | 75 Fragment fragment1 = new Fragment(); in fragmentInBackstack() local 77 fm.beginTransaction().add(R.id.fragment_container, fragment1, "tag").addToBackStack(null) in fragmentInBackstack() 80 CollectingObserver observer1 = observeAndCollectIn(fragment1); in fragmentInBackstack()
|
/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/app/ |
D | FragmentHideShowSupport.java | 47 Fragment fragment1 = fm.findFragmentById(R.id.fragment1); in onCreate() local 48 addShowHideListener(R.id.frag1hide, fragment1); in onCreate() 50 button1.setText(fragment1.isHidden() ? "Show" : "Hide"); in onCreate()
|
D | FragmentNestingTabsSupport.java | 36 mTabHost.setup(this, getSupportFragmentManager(), R.id.fragment1); in onCreate()
|
D | FragmentTabsFragmentSupport.java | 37 mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.fragment1); in onCreateView()
|
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/app/ |
D | VideoFragmentTest.java | 82 Fragment_setSurfaceViewCallbackBeforeCreate fragment1 = in setSurfaceViewCallbackBeforeCreate() local 84 assertNotNull(fragment1); in setSurfaceViewCallbackBeforeCreate() 85 assertTrue(fragment1.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate() 97 assertFalse(fragment1.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate() 103 assertNotSame(fragment1, fragment2); in setSurfaceViewCallbackBeforeCreate()
|
D | VideoSupportFragmentTest.java | 79 Fragment_setSurfaceViewCallbackBeforeCreate fragment1 = in setSurfaceViewCallbackBeforeCreate() local 81 assertNotNull(fragment1); in setSurfaceViewCallbackBeforeCreate() 82 assertTrue(fragment1.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate() 94 assertFalse(fragment1.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate() 100 assertNotSame(fragment1, fragment2); in setSurfaceViewCallbackBeforeCreate()
|