Whenever possible, you should be using string resources to make sure your app can easily be translated to other languages. However to read a string resource, you need access to the context which you don't have in ViewModels. In this video I show you how you can solve this problem.
Get limited 20% discount on all my courses using the code HAPPY-EASTER:
https://pl-coding.com/premium-courses...
💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
https://elopage.com/s/philipplackner/...
🎓 Become an industry-ready developer in the Mobile Dev Campus:
https://pl-coding.com/campus?utm_sour...
🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":
https://pl-coding.com/best-practice-g...
Read our weekly Android blog:
https://pl-coding.com/blog
Join this channel to get access to perks:
/ @philipplackner
Get the initial source code for this video here:
https://github.com/philipplackner/Uni...
Get the final source code here:
https://github.com/philipplackner/Uni...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: https://github.com/philipplackner
You like my free content? Here you can buy me a coffee:
https://www.buymeacoffee.com/philippl...
In questa pagina del sito puoi guardare il video online How to Use String Resources In a ViewModel - Android Studio Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Philipp Lackner 13 aprile 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 44,452 volte e gli è piaciuto 1.5 mille spettatori. Buona visione!