android / android/android-test
I want move activity state to STOPPED, ActivityScenario#moveToState(STOPPED)
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
I want move activity state to STOPPED,but I can not find STOPPED State enum. And I read the source code
```
public ActivityScenario moveToState(State newState) {
...
switch(newState) {
case CREATED:
this.activityInvoker.stopActivity(currentState.activity);
break;
...
```
I should call moveToState(CREATED), it's hard to understand.
### Steps to Reproduce
### Expected Results
### Actual Results
### AndroidX Test and Android OS Versions
```
'androidx.test:runner:1.1.0',
'androidx.test:rules:1.1.0',
'androidx.test.ext:junit:1.1.2',
```
### Link to a public git repo demonstrating the problem:
Contributor guide
Research direction
Start with ActivityScenario#moveToState(State) and the switch shown in the issue, then inspect how activity lifecycle states are represented and transitioned. Confirm how an explicit STOPPED state should behave and add coverage demonstrating that moveToState(STOPPED) reaches the expected lifecycle state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100