Join Slack
Powered by
How can I use the string resource's data in the vi...
# compose-android
m
Mahmoud Ali Yousuf
10/22/2023, 7:59 AM
How can I use the string resource's data in the viewModel so I can make a search of a given list of data?
l
Lanh Trần
10/22/2023, 8:02 AM
You can use
AndroidViewModel
to access
Context
in view model safely
m
Mahmoud Ali Yousuf
10/22/2023, 8:06 AM
@Lanh Trần
so you mean instead of extending
ViewModel()
class,, I'll extend
AndroidViewModel
4
Views
Open in Slack
Previous
Next