update commons to 3.14.1
This commit is contained in:
parent
0f9ff7c2e9
commit
84bc20d732
|
@ -46,7 +46,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.14.0'
|
implementation 'com.simplemobiletools:commons:3.14.1'
|
||||||
implementation 'joda-time:joda-time:2.9.9'
|
implementation 'joda-time:joda-time:2.9.9'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support:multidex:1.0.2'
|
implementation 'com.android.support:multidex:1.0.2'
|
||||||
|
|
|
@ -7,20 +7,21 @@ import com.simplemobiletools.calendar.extensions.config
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
import com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
import kotlinx.android.synthetic.main.dialog_vertical_linear_layout.view.*
|
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) {
|
class RepeatRuleWeeklyDialog(val activity: Activity, val curRepeatRule: Int, val callback: (repeatRule: Int) -> Unit) {
|
||||||
val dialog: AlertDialog
|
val dialog: AlertDialog
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dialog_vertical_linear_layout, null)
|
val view = activity.layoutInflater.inflate(R.layout.dialog_vertical_linear_layout, null)
|
||||||
|
|
||||||
init {
|
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 res = activity.resources
|
||||||
val checkboxes = ArrayList<MyAppCompatCheckbox>(7)
|
val checkboxes = ArrayList<MyAppCompatCheckbox>(7)
|
||||||
for (i in 0..6) {
|
for (i in 0..6) {
|
||||||
val pow = Math.pow(2.0, i.toDouble()).toInt()
|
val pow = Math.pow(2.0, i.toDouble()).toInt()
|
||||||
(activity.layoutInflater.inflate(R.layout.my_checkbox, null) as MyAppCompatCheckbox).apply {
|
(activity.layoutInflater.inflate(R.layout.my_checkbox, null) as MyAppCompatCheckbox).apply {
|
||||||
isChecked = curRepeatRule and pow != 0
|
isChecked = curRepeatRule and pow != 0
|
||||||
text = res.getString(days[i])
|
text = days[i]
|
||||||
id = pow
|
id = pow
|
||||||
checkboxes.add(this)
|
checkboxes.add(this)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue