From 84bc20d7321cda8c2066d536dc169750de679dee Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 28 Feb 2018 18:44:21 +0100 Subject: [PATCH] update commons to 3.14.1 --- app/build.gradle | 2 +- .../calendar/dialogs/RepeatRuleWeeklyDialog.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ce6de48d3..06398e4ec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.14.0' + implementation 'com.simplemobiletools:commons:3.14.1' implementation 'joda-time:joda-time:2.9.9' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support:multidex:1.0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/RepeatRuleWeeklyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/RepeatRuleWeeklyDialog.kt index 18e694065..1348dc50e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/RepeatRuleWeeklyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/RepeatRuleWeeklyDialog.kt @@ -7,20 +7,21 @@ import com.simplemobiletools.calendar.extensions.config import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.views.MyAppCompatCheckbox import kotlinx.android.synthetic.main.dialog_vertical_linear_layout.view.* +import java.util.* class RepeatRuleWeeklyDialog(val activity: Activity, val curRepeatRule: Int, val callback: (repeatRule: Int) -> Unit) { val dialog: AlertDialog val view = activity.layoutInflater.inflate(R.layout.dialog_vertical_linear_layout, null) init { - val days = arrayOf(R.string.monday, R.string.tuesday, R.string.wednesday, R.string.thursday, R.string.friday, R.string.saturday, R.string.sunday) + val days = activity.resources.getStringArray(R.array.week_days) val res = activity.resources val checkboxes = ArrayList(7) for (i in 0..6) { val pow = Math.pow(2.0, i.toDouble()).toInt() (activity.layoutInflater.inflate(R.layout.my_checkbox, null) as MyAppCompatCheckbox).apply { isChecked = curRepeatRule and pow != 0 - text = res.getString(days[i]) + text = days[i] id = pow checkboxes.add(this) }