How to Use String Resources In a ViewModel - Android Studio Tutorial

Your video will begin in 20
Skip ad (5)
ebook offerts

Thanks! Share it with your friends!

You disliked this video. Thanks for the feedback!

Added by admin
77 Views
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/code-review/payment?locale=en

Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
https://pl-coding.com/newsletter

Join this channel to get access to perks:
https://www.youtube.com/channel/UCKNTZMRHPLXfqlbdOI7mCkg/join

Get the initial source code for this video here:
https://github.com/philipplackner/UniversalStringResources

Get the final source code here:
https://github.com/philipplackner/UniversalStringResources/tree/final

Join my Discord server:
https://discord.gg/cwQbmUstEu

Regular programming advice on my Instagram page: https://instagram.com/philipplackner_official
Checkout my GitHub: https://github.com/philipplackner

You like my free content? Here you can buy me a coffee:
https://www.buymeacoffee.com/philipplackner
Category
World Tutorials Country A - L World Tutorials Country N - T

Post your comment

Comments

Be the first to comment