Skip to content
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

BrowseBufferoosViewModelFactory doesn't support multiple ViewModel subclasses #4

Open
vlazzle opened this issue Sep 26, 2017 · 2 comments

Comments

@vlazzle
Copy link

vlazzle commented Sep 26, 2017

This is probably not a big deal right now since there's currently just one ViewModel subclass, but it's still worth noting...

Right now BrowseBufferoosViewModelFactory only supports one ViewModel subclass--BrowseBufferoosViewModel. If you define a second subclass of ViewModel, calling ViewModelProviders.of(this, viewModelFactory).get(SecondViewModel::class.java) will throw IllegalArgumentException: Unknown ViewModel class.

One way to address this is to have BrowseBufferoosViewModelFactory fetch a Provider<ViewModel> from the multibound map using modelClass as the key. Further details.

@hitherejoe
Copy link
Collaborator

Nice! :) Yea I planned on adding something to support this at some point this week - that looks like a good way of doing so

@RowlandOti
Copy link

Hi, @hitherejoe this is not an issue but just curiosity. Kindly, could you please let me know what tool was used to create the flow charts below:

architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants