Created
February 13, 2018 07:27
-
-
Save aartikov/7e47101fd767b985442a057319c1f922 to your computer and use it in GitHub Desktop.
Resource provider
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
package ru.eastbanctech.demo.data.providers.resource | |
import android.content.Context | |
class ContextResourceProvider(private var context: Context) : ResourceProvider { | |
override fun getString(resId: Int): String = | |
context.resources.getString(resId) | |
override fun getString(resId: Int, vararg args: Any): String = | |
context.resources.getString(resId, *args) | |
} |
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
package ru.eastbanctech.demo.data.providers.resource | |
interface ResourceProvider { | |
fun getString(resId: Int): String | |
fun getString(resId: Int, vararg args: Any): String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment