/cts/tests/fragment/src/android/fragment/cts/ |
D | FragmentReorderingTest.java | 54 final CountCallsFragment fragment1 = new CountCallsFragment(); in addReplace() local 59 … mFM.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in addReplace() 67 assertEquals(0, fragment1.onCreateViewCount); in addReplace() 86 final CountCallsFragment fragment1 = new CountCallsFragment(); in startWithPop() local 87 mFM.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit(); in startWithPop() 90 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 98 .add(R.id.fragmentContainer, fragment1) in startWithPop() 104 FragmentTestUtil.assertChildren(mContainer, fragment1); in startWithPop() 105 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() 109 assertEquals(1, fragment1.onCreateViewCount); in startWithPop() [all …]
|
D | FragmentTransitionTest.java | 141 TransitionFragment fragment1 = setupInitialFragment(); in sharedElement() local 147 verifyTransition(fragment1, fragment2, "blueSquare"); in sharedElement() 151 verifyPopTransition(1, fragment2, fragment1); in sharedElement() 158 TransitionFragment fragment1 = setupInitialFragment(); in intermediateFragment() local 163 verifyTransition(fragment1, fragment2, "shared"); in intermediateFragment() 171 verifyPopTransition(2, fragment3, fragment1, fragment2); in intermediateFragment() 177 final TransitionFragment fragment1 = setupInitialFragment(); in removeAdded() local 191 .replace(R.id.fragmentContainer, fragment1) in removeAdded() 201 fragment1.waitForTransition(); in removeAdded() 207 verifyAndClearTransition(fragment1.exitTransition, null, startBlue, startGreen); in removeAdded() [all …]
|
D | PostponedTransitionTest.java | 111 final TransitionFragment fragment1 = new TransitionFragment2(); in backStackNestingLevel() local 114 .replace(R.id.fragmentContainer, fragment1) in backStackNestingLevel() 120 assertForwardTransition(mBeginningFragment, fragment1); in backStackNestingLevel() 125 assertPostponedTransition(fragment1, mBeginningFragment, null); in backStackNestingLevel() 131 assertBackTransition(fragment1, mBeginningFragment); in backStackNestingLevel() 322 TransitionFragment fragment1 = new PostponedFragment1(); in differentContainers() local 326 .add(R.id.fragmentContainer1, fragment1) in differentContainers() 330 fragment1.startPostponedEnterTransition(); in differentContainers() 332 fragment1.waitForTransition(); in differentContainers() 334 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 | 330 Fragment fragment1 = new CorrectFragment(); in commitAllowStateLossDetached() local 333 .add(fragment1, "1") in commitAllowStateLossDetached() 337 final FragmentManager fm = fragment1.getChildFragmentManager(); in commitAllowStateLossDetached() 340 .remove(fragment1) in commitAllowStateLossDetached() 401 final OnGetLayoutInflaterFragment fragment1 = new OnGetLayoutInflaterFragment(); in testGetLayoutInflater() local 402 assertEquals(0, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 404 .add(android.R.id.content, fragment1) in testGetLayoutInflater() 408 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() 409 assertEquals(fragment1.layoutInflater, fragment1.getLayoutInflater()); in testGetLayoutInflater() 411 assertEquals(1, fragment1.onGetLayoutInflaterCalls); in testGetLayoutInflater() [all …]
|
D | FragmentExecuteTests.java | 145 final StrictViewFragment fragment1 = new StrictViewFragment(); in popBackStackImmediateInt() local 148 .add(R.id.fragmentContainer, fragment1, "1") in popBackStackImmediateInt() 172 FragmentTestUtil.assertChildren(container, fragment1); in popBackStackImmediateInt() 174 assertEquals(fragment1, fm.findFragmentById(R.id.fragmentContainer)); in popBackStackImmediateInt() 175 assertEquals(fragment1, fm.findFragmentByTag("1")); in popBackStackImmediateInt() 199 FragmentTestUtil.assertChildren(container, fragment1); in popBackStackImmediateInt() 201 assertEquals(fragment1, fm.findFragmentById(R.id.fragmentContainer)); in popBackStackImmediateInt() 202 assertEquals(fragment1, fm.findFragmentByTag("1")); in popBackStackImmediateInt() 211 final StrictViewFragment fragment1 = new StrictViewFragment(); in popBackStackImmediateString() local 214 .add(R.id.fragmentContainer, fragment1, "1") in popBackStackImmediateString() [all …]
|
D | FragmentAnimatorTest.java | 239 final AnimatorFragment fragment1 = new AnimatorFragment(); in replaceAnimators() local 242 .add(R.id.fragmentContainer, fragment1, "1") in replaceAnimators() 255 assertFragmentAnimation(fragment1, 1, false, EXIT); in replaceAnimators() 265 int expectedAnimations = replacement1 == fragment1 ? 2 : 1; in replaceAnimators() 318 final AnimatorFragment fragment1 = new AnimatorFragment(); in postponedAddRemove() local 320 .add(R.id.fragmentContainer, fragment1) in postponedAddRemove() 337 assertNotNull(fragment1.getView()); in postponedAddRemove() 338 assertEquals(View.VISIBLE, fragment1.getView().getVisibility()); in postponedAddRemove() 339 assertTrue(FragmentTestUtil.isVisible(fragment1)); in postponedAddRemove() 340 assertTrue(fragment1.getView().isAttachedToWindow()); in postponedAddRemove() [all …]
|
D | FragmentLifecycleTest.java | 440 StrictFragment fragment1 = (StrictFragment) fm.findFragmentByTag("1"); in noPrematureStateChange() local 442 assertNotNull(fragment1); in noPrematureStateChange() 443 assertFalse(fragment1.mCalledOnResume); in noPrematureStateChange() 775 Fragment fragment1 = new StrictFragment(); in restoreNonConfig() local 777 .add(fragment1, "1") in restoreNonConfig() 783 fragment2.setTargetFragment(fragment1, 0); in restoreNonConfig() 786 .remove(fragment1) in restoreNonConfig() 822 Fragment fragment1 = new StrictFragment(); in retainedFragmentInBackstack() local 824 .add(fragment1, "1") in retainedFragmentInBackstack() 831 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()
|