convert dbhelper to kotlin

This commit is contained in:
tibbi
2016-11-14 19:05:51 +01:00
parent 70d96bad81
commit ddc5b01820
6 changed files with 130 additions and 147 deletions

View File

@ -17,7 +17,7 @@ class OpenNoteDialog(val activity: Activity) : RadioGroup.OnCheckedChangeListene
val view = activity.layoutInflater.inflate(R.layout.dialog_radio_group, null) as RadioGroup
view.setOnCheckedChangeListener(this)
val notes = DBHelper.newInstance(activity).notes
val notes = DBHelper.newInstance(activity).getNotes()
notes.forEach {
val radioButton = activity.layoutInflater.inflate(R.layout.radio_button, null) as RadioButton
radioButton.apply {

View File

@ -19,7 +19,7 @@ class WidgetNoteDialog(val activity: Activity) : RadioGroup.OnCheckedChangeListe
view.setOnCheckedChangeListener(this)
val db = DBHelper.newInstance(activity)
val notes = db.notes
val notes = db.getNotes()
notes.forEach {
val radioButton = activity.layoutInflater.inflate(R.layout.radio_button, null) as RadioButton
radioButton.apply {