Created
September 11, 2017 15:52
-
-
Save hluhovskyi/d8d0bf20d4837806413b1008ebd6b5d5 to your computer and use it in GitHub Desktop.
This file contains 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
fun View.string(@StringRes id: Int): ReadOnlyProperty<View, String> | |
= StringDelegate(contextProvider, id) | |
fun Activity.string(@StringRes id: Int): ReadOnlyProperty<Activity, String> | |
= StringDelegate(contextProvider, id) | |
fun Fragment.string(@StringRes id: Int): ReadOnlyProperty<Fragment, String> | |
= StringDelegate(contextProvider, id) | |
private class StringDelegate : ReadOnlyProperty<Any, Stirng> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment