Created
July 18, 2020 15:16
-
-
Save seventhmoon/53e359eb71d93fd04a48144c6f40df0b to your computer and use it in GitHub Desktop.
AndroidViewModel KTX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected open fun AndroidViewModel.getString(@StringRes resId: Int) = | |
getApplication<Application>().resources.getString(resId) | |
protected open fun AndroidViewModel.getStringArray(@ArrayRes resId: Int): Array<String> = | |
getApplication<Application>().resources.getStringArray(resId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment