get String with arguments
This commit is contained in:
parent
db07f8766b
commit
f43bd0c6e3
|
|
@ -422,6 +422,18 @@ public abstract class ObservableCollectionAdapter<TItem, TItemViewHolder extends
|
|||
return itemView.getContext().getString(stringRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simply get String from resources with arguments.
|
||||
*
|
||||
* @param stringRes String resource id;
|
||||
* @param formatArgs The format arguments that will be used for substitution;
|
||||
* @return Requested String that matches with provided string resource id.
|
||||
*/
|
||||
@NonNull
|
||||
public String getString(@StringRes final int stringRes, final Object... formatArgs) {
|
||||
return itemView.getContext().getString(stringRes, formatArgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue