mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
convert dbhelper to kotlin
This commit is contained in:
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user