bluelinelabs / bluelinelabs/Conductor

onDestroyView and RetainViewMode.RELEASE_DETACH

Open
#353 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.9k
Forks
338
PR merge metrics
No merged PRs in 30d

Description

Hi, quick question over here:

Based on the Readme lifecycle diagram, whenever the parent activity hits `onStop()` (for example, when the app is sent to background by pressing the home button) and the RetainViewMode is set to it's default `RetainViewMode.RELEASE_DETACH` I should expect to hit `onDetach()` and `onDestroyView()`, right?

I'm having this situation where if I set the retain mode to be `RetainViewMode.RELEASE_DETACH`, `onDestroyView()` is only being invoked when a controller is being popped/pushed to backstack or when I destroy the activity, but when the parent activity hits `onStop()` I only hit `onDetach()` and never `onDestroyView()`. So, I don't know if I'm misinterpreting the diagram or maybe the part where it says "on Activity stopped" is wrong.

Contributor guide

Open the contributing guide

Research direction

Start with the README lifecycle diagram and the documented RetainViewMode.RELEASE_DETACH behavior. Reproduce the reported onStop() case and compare the observed onDetach() and onDestroyView() callbacks with the diagram; done means the lifecycle documentation accurately reflects the behavior or clearly explains the distinction.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
documentation, mobile
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.