Fixed
Status Update
Comments
mm...@commonsware.com <mm...@commonsware.com> #2
+1
I am interested in this feature as well for Master/Detail.
I am interested in this feature as well for Master/Detail.
ma...@google.com <ma...@google.com> #3
Another use case is that if you have a full page spinner activity that loads data from the network.
Once the data is loaded the app navigates to a 2nd activity that presents the data.
We would like to be able to use the same ViewModel instance in both activities.
Once the data is loaded the app navigates to a 2nd activity that presents the data.
We would like to be able to use the same ViewModel instance in both activities.
id...@gmail.com <id...@gmail.com> #4
Adding a situation which I need this: I don't want the UI to wait for a network call. Showing a detail activity will need to get the detail data from the server.
So if I start the API call (which is of course done by the ViewModel) as soon as the user clicks the item, it is already fetching the data while transitioning to the second screen.
Then I don't have to block the starting of the detail activity or wait to trigger the API call until the detail activity is started
So if I start the API call (which is of course done by the ViewModel) as soon as the user clicks the item, it is already fetching the data while transitioning to the second screen.
Then I don't have to block the starting of the detail activity or wait to trigger the API call until the detail activity is started
th...@gcompany.nl <th...@gcompany.nl> #6
what is the status of this issue ??
as...@gmail.com <as...@gmail.com> #7
does any work has done regrading this ??
be...@tola.me.uk <be...@tola.me.uk> #8
we need fatures share the viewModel between activites to apply ViewModel with old project without restructure the app from zero
am...@google.com <am...@google.com> #9
Please add this feature, unfortunately this request has been ignored for 3 years
pe...@gmail.com <pe...@gmail.com> #11
Isn't it just good enough to create a singleton of the viewmodel? I do this using Koin
be...@tola.me.uk <be...@tola.me.uk> #12
Can't believe there is one piece of AD on #10 Floor....
sm...@google.com <sm...@google.com>
ch...@gmail.com <ch...@gmail.com> #13
Reply to "Isn't it just good enough to create a singleton of the viewmodel? I do this using Koin":
herriojr commented on Jan 3, 2018
"My only possible issue with that approach is -> The ViewModel is expected to be cleared when onCleared() is called. Will onCleared() be called multiple times (answer: yes)? For example, if Activity A and B share a ViewModel and from Activity A, I start up Activity B, then close Activity B, onCleared() be called while Activity A still needs the ViewModel. I really feel this version of ViewModels wasn't designed to actually be used across multiple activities."
What is your comment about this cleaning issue?
herriojr commented on Jan 3, 2018
"My only possible issue with that approach is -> The ViewModel is expected to be cleared when onCleared() is called. Will onCleared() be called multiple times (answer: yes)? For example, if Activity A and B share a ViewModel and from Activity A, I start up Activity B, then close Activity B, onCleared() be called while Activity A still needs the ViewModel. I really feel this version of ViewModels wasn't designed to actually be used across multiple activities."
What is your comment about this cleaning issue?
go...@gmail.com <go...@gmail.com> #14
Any update on this ticket?
am...@google.com <am...@google.com>
aj...@samsung.corp-partner.google.com <aj...@samsung.corp-partner.google.com> #15
Any update ?
mi...@samsung.corp-partner.google.com <mi...@samsung.corp-partner.google.com> #17
can you confirm the version in which it has been fixed?
Description
This is not a support forum. Please report bugs or issues related to the
Android Things platform
--------------------------------------------
STEPS TO REPRODUCE:
Build and run the app.
I run it on Raspberry Pi 3 with connected mouse, keyboard and TV. Simple app from template runs correctly.
OBSERVED RESULTS:
App crashes.
Logs:
EXPECTED RESULTS:
App shows web page in WebView
--------------------------------------------