diff options
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/StringHolder.kt')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/utils/StringHolder.kt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/StringHolder.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/StringHolder.kt new file mode 100644 index 0000000..e70a2d1 --- /dev/null +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/StringHolder.kt @@ -0,0 +1,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) +}
\ No newline at end of file |