update commons to 3.14.1

This commit is contained in:
tibbi 2018-02-28 18:44:21 +01:00
parent 0f9ff7c2e9
commit 84bc20d732
2 changed files with 4 additions and 3 deletions

View File

@ -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'

View File

@ -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<MyAppCompatCheckbox>(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)
}