/cts/tests/fragment/src/android/fragment/cts/ |
D | FragmentReorderingTest.java | 55 final CountCallsFragment fragment1 = new CountCallsFragment(); in addReplace() local 60 … mFM.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in addReplace() 68 assertEquals(0, fragment1.onCreateViewCount); in addReplace() 87 final CountCallsFragment fragment1 = new CountCallsFragment(); in startWithPop() local 88 mFM.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in startWithPop() 91 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 99 .add(R.id.fragmentContainer, fragment1) in startWithPop() 105 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 106 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() 110 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() [all …]
|
D | FragmentTransitionTest.java | 142 TransitionFragment fragment1 = setupInitialFragment(); in sharedElement() local 148 verifyTransition(fragment1, fragment2, "blueSquare"); in sharedElement() 152 verifyPopTransition(1, fragment2, fragment1); in sharedElement() 159 TransitionFragment fragment1 = setupInitialFragment(); in intermediateFragment() local 164 verifyTransition(fragment1, fragment2, "shared"); in intermediateFragment() 172 verifyPopTransition(2, fragment3, fragment1, fragment2); in intermediateFragment() 178 final TransitionFragment fragment1 = setupInitialFragment(); in removeAdded() local 192 .replace(R.id.fragmentContainer, fragment1) in removeAdded() 202 fragment1.waitForTransition(); in removeAdded() 208 verifyAndClearTransition(fragment1.exitTransition, null, startBlue, startGreen); in removeAdded() [all …]
|
D | PostponedTransitionTest.java | 113 final TransitionFragment fragment1 = new TransitionFragment2(); in backStackNestingLevel() local 116 .replace(R.id.fragmentContainer, fragment1) in backStackNestingLevel() 122 assertForwardTransition(mBeginningFragment, fragment1); in backStackNestingLevel() 127 assertPostponedTransition(fragment1, mBeginningFragment, null); in backStackNestingLevel() 133 assertBackTransition(fragment1, mBeginningFragment); in backStackNestingLevel() 324 TransitionFragment fragment1 = new PostponedFragment1(); in differentContainers() local 328 .add(R.id.fragmentContainer1, fragment1) in differentContainers() 332 fragment1.startPostponedEnterTransition(); in differentContainers() 334 fragment1.waitForTransition(); in differentContainers() 336 clearTargets(fragment1); in differentContainers() [all …]
|
D | FragmentViewTests.java | 56 final StrictViewFragment fragment1 = new StrictViewFragment(); in addFragments() local 57 fm.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in addFragments() 59 FragmentTestUtil.assertChildren(container, fragment1); in addFragments() 65 FragmentTestUtil.assertChildren(container, fragment1, fragment2); in addFragments() 76 FragmentTestUtil.assertChildren(container, fragment1, fragment2, fragment3, fragment4); in addFragments() 80 FragmentTestUtil.assertChildren(container, fragment1, fragment2); in addFragments() 85 FragmentTestUtil.assertChildren(container, fragment1); in addFragments() 103 final StrictViewFragment fragment1 = new StrictViewFragment(); in addTwoContainers() local 104 fm.beginTransaction().add(R.id.fragmentContainer1, fragment1).addToBackStack(null).commit(); in addTwoContainers() 106 FragmentTestUtil.assertChildren(container1, fragment1); in addTwoContainers() [all …]
|
D | FragmentTransactionTest.java | 331 Fragment fragment1 = new CorrectFragment(); in commitAllowStateLossDetached() local 334 .add(fragment1, "1") in commitAllowStateLossDetached() 338 final FragmentManager fm = fragment1.getChildFragmentManager(); in commitAllowStateLossDetached() 341 .remove(fragment1) in commitAllowStateLossDetached() 402 final OnGetLayoutInflaterFragment fragment1 = new OnGetLayoutInflaterFragment(); in testGetLayoutInflater() local 403 assertEquals(0, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 405 .add(android.R.id.content, fragment1) in testGetLayoutInflater() 409 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 410 assertEquals(fragment1.layoutInflater, fragment1.getLayoutInflater()); in testGetLayoutInflater() 412 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() [all …]
|
D | FragmentExecuteTests.java | 144 final StrictViewFragment fragment1 = new StrictViewFragment(); in popBackStackImmediateInt() local 147 .add(R.id.fragmentContainer, fragment1, "1") in popBackStackImmediateInt() 171 FragmentTestUtil.assertChildren(container, fragment1); in popBackStackImmediateInt() 173 assertEquals(fragment1, fm.findFragmentById(R.id.fragmentContainer)); in popBackStackImmediateInt() 174 assertEquals(fragment1, fm.findFragmentByTag("1")); in popBackStackImmediateInt() 198 FragmentTestUtil.assertChildren(container, fragment1); in popBackStackImmediateInt() 200 assertEquals(fragment1, fm.findFragmentById(R.id.fragmentContainer)); in popBackStackImmediateInt() 201 assertEquals(fragment1, fm.findFragmentByTag("1")); in popBackStackImmediateInt() 210 final StrictViewFragment fragment1 = new StrictViewFragment(); in popBackStackImmediateString() local 213 .add(R.id.fragmentContainer, fragment1, "1") in popBackStackImmediateString() [all …]
|
D | FragmentAnimatorTest.java | 240 final AnimatorFragment fragment1 = new AnimatorFragment(); in replaceAnimators() local 243 .add(R.id.fragmentContainer, fragment1, "1") in replaceAnimators() 256 assertFragmentAnimation(fragment1, 1, false, EXIT); in replaceAnimators() 266 int expectedAnimations = replacement1 == fragment1 ? 2 : 1; in replaceAnimators() 319 final AnimatorFragment fragment1 = new AnimatorFragment(); in postponedAddRemove() local 321 .add(R.id.fragmentContainer, fragment1) in postponedAddRemove() 338 assertNotNull(fragment1.getView()); in postponedAddRemove() 339 assertEquals(View.VISIBLE, fragment1.getView().getVisibility()); in postponedAddRemove() 340 assertTrue(FragmentTestUtil.isVisible(fragment1)); in postponedAddRemove() 341 assertTrue(fragment1.getView().isAttachedToWindow()); in postponedAddRemove() [all …]
|
D | FragmentLifecycleTest.java | 445 StrictFragment fragment1 = (StrictFragment) fm.findFragmentByTag("1"); in noPrematureStateChange() local 447 assertNotNull(fragment1); in noPrematureStateChange() 448 assertFalse(fragment1.mCalledOnResume); in noPrematureStateChange() 780 Fragment fragment1 = new StrictFragment(); in restoreNonConfig() local 782 .add(fragment1, "1") in restoreNonConfig() 788 fragment2.setTargetFragment(fragment1, 0); in restoreNonConfig() 791 .remove(fragment1) in restoreNonConfig() 827 Fragment fragment1 = new StrictFragment(); in retainedFragmentInBackstack() local 829 .add(fragment1, "1") in retainedFragmentInBackstack() 836 fragment1.getChildFragmentManager().beginTransaction() in retainedFragmentInBackstack() [all …]
|
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
D | FragmentTest.java | 47 TestFragment fragment1 = new TestFragment(); in testOnCreateOrder() local 51 .add(R.id.container, fragment1) in testOnCreateOrder() 54 assertEquals(0, fragment1.createOrder); in testOnCreateOrder()
|