You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, really enjoying the library, much prefer it to the other options available. I've found however that you can't inject a ViewModel from the Android Architecture Components library into a standard Android Fragment (i.e. not the v4 support Fragment).
I've seen that it's because the extension methods extend the v4 support Fragment (the getViewModel method and the viewModel delegated property), and was wondering if there is any reason that it does't support standard fragments?
If not I'm happy to create a PR to add the necessary extension methods to the standard fragment if that helps.
Thanks,
Connor
The text was updated successfully, but these errors were encountered:
I've just been looking into a short term workaround, and have discovered that the Android Architecture Components library is only built to work with the support fragment, so I get why the extension methods aren't present. Closing the issue
Yeah thanks for the update, I found that shortly after doing a bit of a search, I'm not used to the Android ecosystem so thanks for posting :) It's quite odd that the blank fragment created by Android Studio is a standard framework fragment rather than a support one
Hey, really enjoying the library, much prefer it to the other options available. I've found however that you can't inject a ViewModel from the Android Architecture Components library into a standard Android Fragment (i.e. not the v4 support Fragment).
I've seen that it's because the extension methods extend the v4 support Fragment (the getViewModel method and the viewModel delegated property), and was wondering if there is any reason that it does't support standard fragments?
If not I'm happy to create a PR to add the necessary extension methods to the standard fragment if that helps.
Thanks,
Connor
The text was updated successfully, but these errors were encountered: