fix getString

This commit is contained in:
Arseniy Borisov 2018-04-24 17:34:29 +03:00
parent 996fefe395
commit 400ae4f00d
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ fun RecyclerView.ViewHolder.getText(@StringRes resId: Int): CharSequence = conte
fun RecyclerView.ViewHolder.getString(@StringRes resId: Int): String = context.getString(resId)
fun RecyclerView.ViewHolder.getString(@StringRes resId: Int, vararg args: Any): String = context.getString(resId, args)
@SuppressWarnings("SpreadOperator") // it's OK for small arrays
fun RecyclerView.ViewHolder.getString(@StringRes resId: Int, vararg args: Any): String = context.getString(resId, *args)
@ColorInt
fun RecyclerView.ViewHolder.getColor(@ColorRes resId: Int): Int = ContextCompat.getColor(context, resId)