Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23f4b08d2a8b48ad1727dde9ae8e5428c201a236
Author: Ian Lake <ilake@google.com>
Date: Mon Jun 22 22:28:42 2020
Support setting the initial state in FragmentScenario
Rather than always moving the Fragment up to the
RESUMED state, let developers choose the initial state,
choosing between CREATED, STARTED, or RESUMED.
This allows developers better control over verifying
the state before moving through each Lifecycle methods
and avoids moving all the way up to RESUMED just to
move back down to another state (which, due to state,
is not the same thing).
Test: updated tests that wanted a non-RESUMED initial state
BUG: 159662750
Relnote: "FragmentScenario now supports setting an initial
Lifecycle state of `CREATED`, `STARTED`, or `RESUMED`
rather than always moving the Fragment to the `RESUMED`
state."
Change-Id: Ia05e755c0ecadc2b32509fed09542e4865d2fa3a
M fragment/fragment-testing/api/1.3.0-alpha07.txt
M fragment/fragment-testing/api/api_lint.ignore
M fragment/fragment-testing/api/current.txt
M fragment/fragment-testing/api/public_plus_experimental_1.3.0-alpha07.txt
M fragment/fragment-testing/api/public_plus_experimental_current.txt
M fragment/fragment-testing/api/restricted_1.3.0-alpha07.txt
M fragment/fragment-testing/api/restricted_current.txt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioDialogFragmentTest.kt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioTest.kt
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.java
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.kt
https://android-review.googlesource.com/1347124
Branch: androidx-master-dev
commit 23f4b08d2a8b48ad1727dde9ae8e5428c201a236
Author: Ian Lake <ilake@google.com>
Date: Mon Jun 22 22:28:42 2020
Support setting the initial state in FragmentScenario
Rather than always moving the Fragment up to the
RESUMED state, let developers choose the initial state,
choosing between CREATED, STARTED, or RESUMED.
This allows developers better control over verifying
the state before moving through each Lifecycle methods
and avoids moving all the way up to RESUMED just to
move back down to another state (which, due to state,
is not the same thing).
Test: updated tests that wanted a non-RESUMED initial state
BUG: 159662750
Relnote: "FragmentScenario now supports setting an initial
Lifecycle state of `CREATED`, `STARTED`, or `RESUMED`
rather than always moving the Fragment to the `RESUMED`
state."
Change-Id: Ia05e755c0ecadc2b32509fed09542e4865d2fa3a
M fragment/fragment-testing/api/1.3.0-alpha07.txt
M fragment/fragment-testing/api/api_lint.ignore
M fragment/fragment-testing/api/current.txt
M fragment/fragment-testing/api/public_plus_experimental_1.3.0-alpha07.txt
M fragment/fragment-testing/api/public_plus_experimental_current.txt
M fragment/fragment-testing/api/restricted_1.3.0-alpha07.txt
M fragment/fragment-testing/api/restricted_current.txt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioDialogFragmentTest.kt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioTest.kt
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.java
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.kt
il...@google.com <il...@google.com> #3
This has been fixed internally and will be available in Fragment 1.3.0-alpha07
.
Description
Component used: Fragment Version used: 1.3.0-alpha06
With the change in b/156527405 to use
setMaxLifecycle()
to controlmoveToState()
,FragmentScenario
should allow you to set an initialLifecycle
state.This would allow developers to stop the Fragment at the
CREATED
state and verify state before moving it upward toSTARTED
orRESUMED
.