blob: e70a2d1e257e516d3b6c223656271e701d54fd12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package ca.allanwang.kau.utils
import android.content.Context
import android.support.annotation.StringRes
/**
* Created by Allan Wang on 2017-06-08.
*/
class StringHolder {
var text: String? = null
var textRes: Int = 0
constructor(@StringRes textRes: Int) {
this.textRes = textRes
}
constructor(text: String) {
this.text = text
}
fun getString(context: Context) = context.string(textRes, text)
}
|