Skip to content

Instantly share code, notes, and snippets.

@aartikov
Created February 13, 2018 07:27
Show Gist options
  • Save aartikov/7e47101fd767b985442a057319c1f922 to your computer and use it in GitHub Desktop.
Save aartikov/7e47101fd767b985442a057319c1f922 to your computer and use it in GitHub Desktop.
Resource provider
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)
}
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