Introduce simplePluralStringResource methods, as Composable and in StringProvider.
This commit is contained in:
parent
e5f85592d9
commit
8eb5a55673
8 changed files with 104 additions and 10 deletions
|
|
@ -24,4 +24,9 @@ class InstrumentationStringProvider : StringProvider {
|
|||
override fun getQuantityString(resId: Int, quantity: Int, vararg formatArgs: Any?): String {
|
||||
return resource.getQuantityString(resId, quantity, *formatArgs)
|
||||
}
|
||||
|
||||
override fun getSimpleQuantityString(resIdForOne: Int, resIdForOthers: Int, quantity: Int, vararg formatArgs: Any?): String {
|
||||
val resId = if (quantity == 1) resIdForOne else resIdForOthers
|
||||
return resource.getString(resId, *formatArgs)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue