Home
last modified time | relevance | path

Searched refs:viewModelStore (Results 1 – 19 of 19) sorted by relevance

/fragment/fragment/src/androidTest/java/androidx/fragment/app/
DTargetFragmentLifeCycleTest.kt81 val viewModelStore = ViewModelStore() in targetFragmentRestoreLifecycleStateBackStack() constant
84 ControllerHostCallbacks(activityRule.activity, viewModelStore) in targetFragmentRestoreLifecycleStateBackStack()
112 val fc2 = fc1.restart(activityRule, viewModelStore) in targetFragmentRestoreLifecycleStateBackStack()
115 fc2.shutdown(viewModelStore) in targetFragmentRestoreLifecycleStateBackStack()
121 val viewModelStore = ViewModelStore() in targetFragmentRestoreLifecycleStateManagerOrder() constant
124 ControllerHostCallbacks(activityRule.activity, viewModelStore) in targetFragmentRestoreLifecycleStateManagerOrder()
153 val fc2 = fc1.restart(activityRule, viewModelStore) in targetFragmentRestoreLifecycleStateManagerOrder()
156 fc2.shutdown(viewModelStore) in targetFragmentRestoreLifecycleStateManagerOrder()
162 val viewModelStore = ViewModelStore() in targetFragmentClearedWhenSetToNull() constant
163 val fc = activityRule.startupFragmentController(viewModelStore) in targetFragmentClearedWhenSetToNull()
[all …]
DFragmentLifecycleTest.kt273 val viewModelStore = ViewModelStore() in <lambda>() constant
276 ControllerHostCallbacks(activityRule.activity, viewModelStore) in <lambda>()
299 val viewModelStore = ViewModelStore() in <lambda>() constant
300 val fc = activityRule.startupFragmentController(viewModelStore) in <lambda>()
321 val viewModelStore = ViewModelStore() in <lambda>() constant
322 val fc = activityRule.startupFragmentController(viewModelStore) in <lambda>()
352 val viewModelStore = ViewModelStore() in <lambda>() constant
353 val fc = activityRule.startupFragmentController(viewModelStore) in <lambda>()
377 val viewModelStore = ViewModelStore() in <lambda>() constant
378 val fc = activityRule.startupFragmentController(viewModelStore) in <lambda>()
[all …]
DSaveStateFragmentTest.kt120 val viewModelStore = ViewModelStore() in testFragmentViewStateSaved() constant
121 val fc1 = activityRule.startupFragmentController(viewModelStore) in testFragmentViewStateSaved()
137 val fc2 = activityRule.startupFragmentController(viewModelStore, savedState) in testFragmentViewStateSaved()
150 fc2.shutdown(viewModelStore) in testFragmentViewStateSaved()
159 val viewModelStore = ViewModelStore() in restoreRetainedInstanceFragments() constant
162 ControllerHostCallbacks(activityRule.activity, viewModelStore) in restoreRetainedInstanceFragments()
245 ControllerHostCallbacks(activityRule.activity, viewModelStore) in restoreRetainedInstanceFragments()
319 fc2.shutdown(viewModelStore) in restoreRetainedInstanceFragments()
341 val viewModelStore = ViewModelStore() in restoreRetainedInstanceFragmentWithTransparentActivityConfigChange() constant
344 ControllerHostCallbacks(activityRule.activity, viewModelStore) in restoreRetainedInstanceFragmentWithTransparentActivityConfigChange()
[all …]
DControllerHostCallbacks.kt33 viewModelStore: ViewModelStore, in startupFragmentController()
38 fc = FragmentController.createController(ControllerHostCallbacks(activity, viewModelStore)) in startupFragmentController()
54 viewModelStore: ViewModelStore, in FragmentController()
58 rule.runOnUiThreadRethrow { savedState = shutdown(viewModelStore, destroyNonConfig) } in FragmentController()
59 return rule.startupFragmentController(viewModelStore, savedState) in FragmentController()
63 viewModelStore: ViewModelStore, in FragmentController()
70 viewModelStore.clear() in FragmentController()
81 override val viewModelStore: ViewModelStore = vmStore constant in androidx.fragment.app.ControllerHostCallbacks
DDialogFragmentTest.kt132 val viewModelStore = ViewModelStore() in testDialogFragmentDismissAllowingStateLoss() constant
133 val fc = activityTestRule.startupFragmentController(viewModelStore) in testDialogFragmentDismissAllowingStateLoss()
161 val viewModelStore = ViewModelStore() in testDialogFragmentDismissAllowingStateLossInFragmentTransaction() constant
162 val fc = activityTestRule.startupFragmentController(viewModelStore) in testDialogFragmentDismissAllowingStateLossInFragmentTransaction()
340 val viewModelStore = ViewModelStore() in testSavedInstanceStateAlertDialog() constant
341 val fc1 = activityTestRule.startupFragmentController(viewModelStore) in testSavedInstanceStateAlertDialog()
357 val fc2 = activityTestRule.startupFragmentController(viewModelStore, savedState) in testSavedInstanceStateAlertDialog()
374 fc2.shutdown(viewModelStore) in testSavedInstanceStateAlertDialog()
380 val viewModelStore = ViewModelStore() in testSavedViewInstanceState() constant
381 val fc1 = activityTestRule.startupFragmentController(viewModelStore) in testSavedViewInstanceState()
[all …]
DFragmentManagerViewModelTest.kt92 val viewModelStore = viewModel.getViewModelStore(fragment) in testGetViewModelStore() constant
93 assertThat(viewModel.getViewModelStore(fragment)).isSameInstanceAs(viewModelStore) in testGetViewModelStore()
96 assertThat(viewModel.getViewModelStore(fragment)).isNotSameInstanceAs(viewModelStore) in testGetViewModelStore()
133 val viewModelStore = viewModel.getViewModelStore(fragment) in testViewModelStoreInSnapshot() constant
138 assertThat(viewModel.getViewModelStore(fragment)).isSameInstanceAs(viewModelStore) in testViewModelStoreInSnapshot()
DProviderCallbackTest.kt124 val viewModelStore = ViewModelStore() in onConfigurationChangedNestedFragmentsCustomController() constant
125 val fc = activityTestRule.startupFragmentController(viewModelStore) in onConfigurationChangedNestedFragmentsCustomController()
228 val viewModelStore = ViewModelStore() in onMultiWindowModeChangedNestedFragmentsCustomController() constant
229 val fc = activityTestRule.startupFragmentController(viewModelStore) in onMultiWindowModeChangedNestedFragmentsCustomController()
332 val viewModelStore = ViewModelStore() in onPictureInPictureModeChangedNestedFragmentsCustomController() constant
333 val fc = activityTestRule.startupFragmentController(viewModelStore) in onPictureInPictureModeChangedNestedFragmentsCustomController()
430 val viewModelStore = ViewModelStore() in onLowMemoryNestedFragmentsCustomController() constant
431 val fc = activityTestRule.startupFragmentController(viewModelStore) in onLowMemoryNestedFragmentsCustomController()
DBackStackRecordTest.kt413 val viewModelStore = ViewModelStore() in setMaxLifecycleWrongFragmentManager() constant
414 val fc1 = activityRule.startupFragmentController(viewModelStore) in setMaxLifecycleWrongFragmentManager()
415 val fc2 = activityRule.startupFragmentController(viewModelStore) in setMaxLifecycleWrongFragmentManager()
441 val viewModelStore = ViewModelStore() in setMaxLifecycleInitialized() constant
442 val fc = activityRule.startupFragmentController(viewModelStore) in setMaxLifecycleInitialized()
462 val viewModelStore = ViewModelStore() in setMaxLifecycleInitializedAfterCreated() constant
463 val fc = activityRule.startupFragmentController(viewModelStore) in setMaxLifecycleInitializedAfterCreated()
493 val viewModelStore = ViewModelStore() in setMaxLifecycleDestroyed() constant
494 val fc = activityRule.startupFragmentController(viewModelStore) in setMaxLifecycleDestroyed()
DReentrantFragmentTest.kt69 val viewModelStore = ViewModelStore() in preventReentrantCalls() constant
70 val fc1 = activityRule.startupFragmentController(viewModelStore) in preventReentrantCalls()
116 activityRule.startupFragmentController(viewModelStore, savedState) in preventReentrantCalls()
DViewModelTest.kt47 Fragment().viewModelStore in <lambda>()
63 fragment.viewModelStore in <lambda>()
97 childFragment.viewModelStore in <lambda>()
179 fragment.viewModelStore, in <lambda>()
DFragmentAnimatorTest.kt512 val viewModelStore = ViewModelStore() in saveWhileAnimatingAway() constant
513 val fc1 = activityRule.startupFragmentController(viewModelStore) in saveWhileAnimatingAway()
549 val fc2 = fc1.restart(activityRule, viewModelStore) in saveWhileAnimatingAway()
564 val viewModelStore = ViewModelStore() in cancelAllAnimatorsWhenFragmentManagerDestroyed() constant
565 val fc1 = activityRule.startupFragmentController(viewModelStore) in cancelAllAnimatorsWhenFragmentManagerDestroyed()
592 fc1.shutdown(viewModelStore) in cancelAllAnimatorsWhenFragmentManagerDestroyed()
603 val viewModelStore = ViewModelStore() in reAddAnimatingAwayAnimatorFragment() constant
604 val fc1 = activityRule.startupFragmentController(viewModelStore) in reAddAnimatingAwayAnimatorFragment()
DFragmentViewLifecycleOwnerTest.kt109 viewLifecycleOwner.viewModelStore, in testCreateViewModelViaExtras()
145 viewLifecycleOwner.viewModelStore, in testCreateViewModelViaExtrasSavedState()
DFragmentAnimationTest.kt463 val viewModelStore = ViewModelStore() in saveWhileAnimatingAway() constant
464 val fc1 = activityRule.startupFragmentController(viewModelStore) in saveWhileAnimatingAway()
492 val fc2 = fc1.restart(activityRule, viewModelStore) in saveWhileAnimatingAway()
507 val viewModelStore = ViewModelStore() in cancelAllAnimationsWhenFragmentManagerDestroyed() constant
508 val fc1 = activityRule.startupFragmentController(viewModelStore) in cancelAllAnimationsWhenFragmentManagerDestroyed()
530 fc1.restart(activityRule, viewModelStore) in cancelAllAnimationsWhenFragmentManagerDestroyed()
543 val viewModelStore = ViewModelStore() in reAddAnimatingAwayAnimationFragment() constant
544 val fc1 = activityRule.startupFragmentController(viewModelStore) in reAddAnimatingAwayAnimationFragment()
587 val viewModelStore = ViewModelStore() in popReplaceOperationWithAnimations() constant
588 val fc1 = activityRule.startupFragmentController(viewModelStore) in popReplaceOperationWithAnimations()
DPostponedTransitionTest.kt925 val viewModelStore = ViewModelStore() in saveWhilePostponed() constant
926 val fc1 = activityRule.startupFragmentController(viewModelStore) in saveWhilePostponed()
938 val fc2 = fc1.restart(activityRule, viewModelStore) in saveWhilePostponed()
/fragment/fragment/src/main/java/androidx/fragment/app/
DFragmentManagerViewModel.java50 static @NonNull FragmentManagerViewModel getInstance(ViewModelStore viewModelStore) { in getInstance() argument
51 ViewModelProvider viewModelProvider = new ViewModelProvider(viewModelStore, in getInstance()
173 ViewModelStore viewModelStore = mViewModelStores.get(f.mWho); in getViewModelStore() local
174 if (viewModelStore == null) { in getViewModelStore()
175 viewModelStore = new ViewModelStore(); in getViewModelStore()
176 mViewModelStores.put(f.mWho, viewModelStore); in getViewModelStore()
178 return viewModelStore; in getViewModelStore()
211 ViewModelStore viewModelStore = mViewModelStores.get(who); in clearNonConfigStateInternal() local
212 if (viewModelStore != null) { in clearNonConfigStateInternal()
213 viewModelStore.clear(); in clearNonConfigStateInternal()
DFragmentViewLifecycleOwner.java55 @NonNull ViewModelStore viewModelStore, in FragmentViewLifecycleOwner() argument
59 mViewModelStore = viewModelStore; in FragmentViewLifecycleOwner()
DFragmentManager.java2962 ViewModelStore viewModelStore = ((ViewModelStoreOwner) host).getViewModelStore(); in attachController() local
2963 mNonConfig = FragmentManagerViewModel.getInstance(viewModelStore); in attachController()
/fragment/fragment-ktx/src/main/java/androidx/fragment/app/
DFragmentViewModelLazy.kt68 { owner.viewModelStore }, in <lambda>()
116 { owner.viewModelStore }, in <lambda>()
156 { requireActivity().viewModelStore }, in activityViewModels()
184 { requireActivity().viewModelStore }, in activityViewModels()
/fragment/fragment/src/androidTest/java/androidx/fragment/app/test/
DViewModelActivity.kt38 preOnCreateViewModelStore = viewModelStore in onCreate()
40 postOnCreateViewModelStore = viewModelStore in onCreate()