Allow opening files as Checklists

This commit is contained in:
Pavol Franek
2020-03-29 10:40:17 +02:00
parent 8bdac0e761
commit 6733a9f263
2 changed files with 9 additions and 6 deletions

View File

@ -15,12 +15,14 @@ import com.simplemobiletools.notes.pro.helpers.NoteType
import com.simplemobiletools.notes.pro.models.Note
import kotlinx.android.synthetic.main.dialog_new_note.view.*
class NewNoteDialog(val activity: Activity, callback: (note: Note) -> Unit) {
class NewNoteDialog(val activity: Activity, title: String? = null, callback: (note: Note) -> Unit) {
init {
val view = activity.layoutInflater.inflate(R.layout.dialog_new_note, null).apply {
new_note_type.check(if (activity.config.lastCreatedNoteType == NoteType.TYPE_TEXT.value) type_text_note.id else type_checklist.id)
}
view.note_title.setText(title)
AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)