Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@maskaravivek
Created May 17, 2018 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maskaravivek/6d64495bbec8f361cbfdc2b8c707bea2 to your computer and use it in GitHub Desktop.
Save maskaravivek/6d64495bbec8f361cbfdc2b8c707bea2 to your computer and use it in GitHub Desktop.
@Singleton
class UserService @Inject
constructor(private var context: Context) {
fun displayUserName(name: String): String {
val userNameFormat = context.getString(R.string.display_user_name)
return String.format(Locale.ENGLISH, userNameFormat, name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment