-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set view tree owners in parent class #615
Conversation
ViewTreeLifecycleOwner.set(window.decorView, this) | ||
ViewTreeViewModelStoreOwner.set(window.decorView, this) | ||
ViewTreeSavedStateRegistryOwner.set(window.decorView, this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there are now setViewTreeXyz
extensions that don't need to take in this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this artifact was already there & the ext fun weren't visible so i stuck w/ this
@@ -81,4 +85,16 @@ abstract class CoreAppCompatActivity : AppCompatActivity() { | |||
super.onActivityResult(requestCode, resultCode, data) | |||
activityDelegate?.onActivityResult(this, requestCode, resultCode, data) | |||
} | |||
|
|||
/** | |||
* [RibActivity] must call this since it does not use [ComponentActivity.setContentView] which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens for activities that extend from this and call setContentView? I imagine lifecycle owners get overwritten and that's ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overwritten & ok
A followup to #606 which moves the logic into the superclass so all
CoreAppCompatActivity
subclasses benefit from the updated logic