Home
last modified time | relevance | path

Searched refs:fragment2 (Results 1 – 20 of 20) sorted by relevance

/frameworks/support/fragment/src/androidTest/java/androidx/fragment/app/
DFragmentTransitionTest.java145 TransitionFragment fragment2 = new TransitionFragment(); in sharedElement() local
146 fragment2.setLayoutId(R.layout.scene2); in sharedElement()
148 verifyTransition(fragment1, fragment2, "blueSquare"); in sharedElement()
151 verifyPopTransition(1, fragment2, fragment1); in sharedElement()
159 final TransitionFragment fragment2 = new TransitionFragment(); in intermediateFragment() local
160 fragment2.setLayoutId(R.layout.scene3); in intermediateFragment()
162 verifyTransition(fragment1, fragment2, "shared"); in intermediateFragment()
167 verifyTransition(fragment2, fragment3, "blueSquare"); in intermediateFragment()
170 verifyPopTransition(2, fragment3, fragment1, fragment2); in intermediateFragment()
181 final TransitionFragment fragment2 = new TransitionFragment(); in removeAdded() local
[all …]
DPostponedTransitionTest.java143 final TransitionFragment fragment2 = new TransitionFragment2(); in backStackNestingLevel() local
146 .replace(R.id.fragmentContainer, fragment2) in backStackNestingLevel()
152 assertForwardTransition(mBeginningFragment, fragment2); in backStackNestingLevel()
157 assertPostponedTransition(fragment2, mBeginningFragment, null); in backStackNestingLevel()
163 assertBackTransition(fragment2, mBeginningFragment); in backStackNestingLevel()
173 final PostponedFragment2 fragment2 = new PostponedFragment2(); in forcedTransition1() local
184 .replace(R.id.fragmentContainer, fragment2) in forcedTransition1()
200 assertForwardTransition(mBeginningFragment, fragment2); in forcedTransition1()
203 assertPostponedTransition(fragment2, fragment3, mBeginningFragment); in forcedTransition1()
209 assertForwardTransition(fragment2, fragment3); in forcedTransition1()
[all …]
DViewModelTest.java86 ViewModelFragment fragment2 = getFragment(viewModelActivity[0], in testSameActivityViewModels()
89 assertThat(fragment2, notNullValue()); in testSameActivityViewModels()
92 assertThat(fragment2.activityModel, is(activityModel[0])); in testSameActivityViewModels()
95 assertThat(fragment2.defaultActivityModel, is(defaultActivityModel[0])); in testSameActivityViewModels()
108 ViewModelFragment fragment2 = getFragment(viewModelActivity[0], in testSameActivityViewModels()
111 assertThat(fragment2, notNullValue()); in testSameActivityViewModels()
114 assertThat(fragment2.activityModel, is(activityModel[0])); in testSameActivityViewModels()
117 assertThat(fragment2.defaultActivityModel, is(defaultActivityModel[0])); in testSameActivityViewModels()
133 ViewModelFragment fragment2 = getFragment(viewModelActivity[0], in testSameFragmentViewModels()
136 assertThat(fragment2, notNullValue()); in testSameFragmentViewModels()
[all …]
DFragmentAnimationTest.java203 final AnimatorFragment fragment2 = new AnimatorFragment(); in replaceAnimators() local
206 .add(R.id.fragmentContainer, fragment2, "2") in replaceAnimators()
219 assertFragmentAnimation(fragment2, 1, false, EXIT); in replaceAnimators()
291 final AnimatorFragment fragment2 = new AnimatorFragment(); in postponedAddRemove() local
292 fragment2.postponeEnterTransition(); in postponedAddRemove()
296 .replace(R.id.fragmentContainer, fragment2) in postponedAddRemove()
303 assertPostponed(fragment2, 0); in postponedAddRemove()
309 fragment2.startPostponedEnterTransition(); in postponedAddRemove()
328 final AnimatorFragment fragment2 = new AnimatorFragment(); in popPostponed() local
329 fragment2.postponeEnterTransition(); in popPostponed()
[all …]
DFragmentViewTests.java75 final StrictViewFragment fragment2 = new StrictViewFragment(); in addFragments() local
76 fm.beginTransaction().add(R.id.fragmentContainer, fragment2).addToBackStack(null).commit(); 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()
121 final StrictViewFragment fragment2 = new StrictViewFragment(); in addTwoContainers() local
122 fm.beginTransaction().add(R.id.fragmentContainer2, fragment2).addToBackStack(null).commit(); in addTwoContainers()
124 FragmentTestUtil.assertChildren(container2, fragment2); in addTwoContainers()
136 FragmentTestUtil.assertChildren(container2, fragment2, fragment4); in addTwoContainers()
141 FragmentTestUtil.assertChildren(container2, fragment2); in addTwoContainers()
[all …]
DFragmentAnimatorTest.java287 final AnimatorFragment fragment2 = new AnimatorFragment(); in replaceAnimators() local
290 .add(R.id.fragmentContainer, fragment2, "2") in replaceAnimators()
305 assertFragmentAnimation(fragment2, 1, false, EXIT); in replaceAnimators()
381 final AnimatorFragment fragment2 = new AnimatorFragment(); in postponedAddRemove() local
382 fragment2.postponeEnterTransition(); in postponedAddRemove()
386 .replace(R.id.fragmentContainer, fragment2) in postponedAddRemove()
393 assertPostponed(fragment2, 0); in postponedAddRemove()
399 fragment2.startPostponedEnterTransition(); in postponedAddRemove()
418 final AnimatorFragment fragment2 = new AnimatorFragment(); in popPostponed() local
419 fragment2.postponeEnterTransition(); in popPostponed()
[all …]
DFragmentReorderingTest.java64 final StrictViewFragment fragment2 = new StrictViewFragment(); in addReplace() local
74 .replace(R.id.fragmentContainer, fragment2) in addReplace()
82 FragmentTestUtil.assertChildren(mContainer, fragment2); in addReplace()
135 final CountCallsFragment fragment2 = new CountCallsFragment(); in middlePop() local
146 .add(R.id.fragmentContainer, fragment2) in middlePop()
153 FragmentTestUtil.assertChildren(mContainer, fragment2); in middlePop()
155 assertEquals(1, fragment2.onCreateViewCount); in middlePop()
159 assertEquals(1, fragment2.onDetachCount); in middlePop()
550 final CountCallsFragment fragment2 = new CountCallsFragment(); in viewOrder() local
556 .replace(R.id.fragmentContainer, fragment2) in viewOrder()
[all …]
DFragmentTransactionTest.java202 final OnGetLayoutInflaterFragment fragment2 = new OnGetLayoutInflaterFragment(); in testGetLayoutInflater()
204 .replace(R.id.content, fragment2) in testGetLayoutInflater()
366 Fragment fragment2 = new CorrectFragment(); in getFragmentsOffThread() local
368 .add(R.id.content, fragment2) in getFragmentsOffThread()
401 Fragment fragment2 = new CorrectFragment(); in commitAllowStateLossDetached() local
403 .add(fragment2, "2") in commitAllowStateLossDetached()
DFragmentLifecycleTest.java979 Fragment fragment2 = new StrictFragment(); in restoreNonConfig() local
980 fragment2.setRetainInstance(true); in restoreNonConfig()
981 fragment2.setTargetFragment(fragment1, 0); in restoreNonConfig()
985 .add(fragment2, "2") in restoreNonConfig()
998 if (fragment == fragment2) { in restoreNonConfig()
1032 Fragment fragment2 = new StrictFragment(); in retainedFragmentInBackstack() local
1035 .add(fragment2, "2") in retainedFragmentInBackstack()
1071 SaveStateFragment fragment2 = SaveStateFragment.create(2); in saveRemovedFragment() local
1073 .replace(android.R.id.content, fragment2, "2") in saveRemovedFragment()
1084 fragment2 = (SaveStateFragment) fm.findFragmentByTag("2"); in saveRemovedFragment()
[all …]
DFragmentTest.java68 OrderFragment fragment2 = new OrderFragment(); in testOnCreateOrder() local
72 .add(R.id.content, fragment2) in testOnCreateOrder()
75 assertEquals(1, fragment2.createOrder); in testOnCreateOrder()
/frameworks/support/transition/src/androidTest/java/androidx/transition/
DFragmentTransitionTest.java69 final TransitionFragment fragment2 = TransitionFragment.newInstance(R.layout.scene3); in preconditions() local
74 showFragment(fragment2, true, new Pair<>(fragment1.mGreen, "green")); in preconditions()
75 assertNotNull(fragment2.mRed); in preconditions()
76 assertNotNull(fragment2.mGreen); in preconditions()
77 assertNotNull(fragment2.mBlue); in preconditions()
83 final TransitionFragment fragment2 = TransitionFragment.newInstance(R.layout.scene3); in nonSharedTransition() local
85 showFragment(fragment2, true, null); in nonSharedTransition()
90 verify(fragment2.mListeners.get(TransitionFragment.TRANSITION_ENTER)) in nonSharedTransition()
92 verify(fragment2.mListeners.get(TransitionFragment.TRANSITION_ENTER), timeout(3000)) in nonSharedTransition()
97 verify(fragment2.mListeners.get(TransitionFragment.TRANSITION_RETURN)) in nonSharedTransition()
[all …]
/frameworks/support/lifecycle/extensions/src/androidTest/java/androidx/lifecycle/
DViewModelTest.java69 ViewModelFragment fragment2 = getFragment(viewModelActivity[0], in ensureSameViewHolders()
72 assertThat(fragment2, notNullValue()); in ensureSameViewHolders()
73 assertThat(fragment1.activityModel, is(fragment2.activityModel)); in ensureSameViewHolders()
74 assertThat(fragment1.fragmentModel, not(is(fragment2.activityModel))); in ensureSameViewHolders()
80 fragment2Model[0] = fragment2.fragmentModel; in ensureSameViewHolders()
89 ViewModelFragment fragment2 = getFragment(viewModelActivity[0], in ensureSameViewHolders()
92 assertThat(fragment2, notNullValue()); in ensureSameViewHolders()
95 assertThat(fragment2.activityModel, is(activityModel[0])); in ensureSameViewHolders()
97 assertThat(fragment2.fragmentModel, is(fragment2Model[0])); in ensureSameViewHolders()
99 assertThat(fragment2.defaultActivityModel, is(defaultActivityModel[0])); in ensureSameViewHolders()
DFragmentOperationsLifecycleTest.java83 Fragment fragment2 = new Fragment(); in fragmentInBackstack() local
84 fm.beginTransaction().replace(R.id.fragment_container, fragment2).addToBackStack(null) in fragmentInBackstack()
88 CollectingObserver observer2 = observeAndCollectIn(fragment2); in fragmentInBackstack()
/frameworks/support/lifecycle/integration-tests/testapp/src/androidTest/java/androidx/lifecycle/
DLiveDataOnSaveInstanceStateTest.java72 CollectingSupportFragment fragment2 = new CollectingSupportFragment(); in liveData_partiallyObscuredActivityFragmentInFragment_maxSdkM() local
75 fragment.replaceFragment(fragment2); in liveData_partiallyObscuredActivityFragmentInFragment_maxSdkM()
78 liveData_partiallyObscuredLifecycleOwner_maxSdkM(fragment2); in liveData_partiallyObscuredActivityFragmentInFragment_maxSdkM()
104 CollectingSupportFragment fragment2 = new CollectingSupportFragment(); in liveData_partiallyObscuredActivityFragmentInFragment_minSdkN() local
107 fragment.replaceFragment(fragment2); in liveData_partiallyObscuredActivityFragmentInFragment_minSdkN()
110 liveData_partiallyObscuredLifecycleOwner_minSdkN(fragment2); in liveData_partiallyObscuredActivityFragmentInFragment_minSdkN()
DFragmentInBackStackLifecycleTest.java76 Fragment fragment2 = new Fragment(); in test() local
77 fm.beginTransaction().replace(R.id.fragment_container, fragment2).addToBackStack(null) in test()
/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/app/
DFragmentHideShowSupport.java51 Fragment fragment2 = fm.findFragmentById(R.id.fragment2); in onCreate() local
52 addShowHideListener(R.id.frag2hide, fragment2); in onCreate()
54 button2.setText(fragment2.isHidden() ? "Show" : "Hide"); in onCreate()
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/app/
DRowsFragmentTest.java1000 final F_standard fragment2 = ((F_standard) activity2.getTestFragment()); in browseFragmentRestore() local
1002 fragment2.assertNoEntranceTransition(); in browseFragmentRestore()
1003 assertEquals(1, fragment2.getSelectedPosition()); in browseFragmentRestore()
1004 assertEquals(2, ((ListRowPresenter.ViewHolder) fragment2.getSelectedRowViewHolder()) in browseFragmentRestore()
1208 final F_3ListRow2PageRow fragment2 = ((F_3ListRow2PageRow) activity2.getTestFragment()); in mixedBrowseFragmentRestoreToListRow() local
1209 assertFalse(fragment2.isShowingHeaders()); in mixedBrowseFragmentRestoreToListRow()
1210 fragment2.assertNoEntranceTransition(); in mixedBrowseFragmentRestoreToListRow()
1211 assertEquals(1, fragment2.getSelectedPosition()); in mixedBrowseFragmentRestoreToListRow()
1212 assertEquals(2, ((ListRowPresenter.ViewHolder) fragment2.getSelectedRowViewHolder()) in mixedBrowseFragmentRestoreToListRow()
1259 final F_3ListRow2PageRow fragment2 = ((F_3ListRow2PageRow) activity2.getTestFragment()); in mixedBrowseFragmentRestoreToSampleRowsFragment() local
[all …]
DRowsSupportFragmentTest.java997 final F_standard fragment2 = ((F_standard) activity2.getTestFragment()); in browseFragmentRestore() local
999 fragment2.assertNoEntranceTransition(); in browseFragmentRestore()
1000 assertEquals(1, fragment2.getSelectedPosition()); in browseFragmentRestore()
1001 assertEquals(2, ((ListRowPresenter.ViewHolder) fragment2.getSelectedRowViewHolder()) in browseFragmentRestore()
1205 final F_3ListRow2PageRow fragment2 = ((F_3ListRow2PageRow) activity2.getTestFragment()); in mixedBrowseSupportFragmentRestoreToListRow() local
1206 assertFalse(fragment2.isShowingHeaders()); in mixedBrowseSupportFragmentRestoreToListRow()
1207 fragment2.assertNoEntranceTransition(); in mixedBrowseSupportFragmentRestoreToListRow()
1208 assertEquals(1, fragment2.getSelectedPosition()); in mixedBrowseSupportFragmentRestoreToListRow()
1209 assertEquals(2, ((ListRowPresenter.ViewHolder) fragment2.getSelectedRowViewHolder()) in mixedBrowseSupportFragmentRestoreToListRow()
1256 final F_3ListRow2PageRow fragment2 = ((F_3ListRow2PageRow) activity2.getTestFragment()); in mixedBrowseSupportFragmentRestoreToSampleRowsSupportFragment() local
[all …]
DVideoFragmentTest.java99 Fragment_setSurfaceViewCallbackBeforeCreate fragment2 = in setSurfaceViewCallbackBeforeCreate() local
101 assertNotNull(fragment2); in setSurfaceViewCallbackBeforeCreate()
102 assertTrue(fragment2.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate()
103 assertNotSame(fragment1, fragment2); in setSurfaceViewCallbackBeforeCreate()
DVideoSupportFragmentTest.java96 Fragment_setSurfaceViewCallbackBeforeCreate fragment2 = in setSurfaceViewCallbackBeforeCreate() local
98 assertNotNull(fragment2); in setSurfaceViewCallbackBeforeCreate()
99 assertTrue(fragment2.mSurfaceCreated); in setSurfaceViewCallbackBeforeCreate()
100 assertNotSame(fragment1, fragment2); in setSurfaceViewCallbackBeforeCreate()