mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
couple small tweaks here and there
This commit is contained in:
@ -3,7 +3,6 @@ package com.simplemobiletools.notes.dialogs
|
||||
import android.app.Activity
|
||||
import android.content.DialogInterface.BUTTON_POSITIVE
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.view.LayoutInflater
|
||||
import android.view.WindowManager
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
@ -16,7 +15,7 @@ import kotlinx.android.synthetic.main.new_note.view.*
|
||||
class RenameNoteDialog(val activity: Activity, val db: DBHelper, val note: Note, callback: (note: Note) -> Unit) {
|
||||
|
||||
init {
|
||||
val view = LayoutInflater.from(activity).inflate(R.layout.rename_note, null)
|
||||
val view = activity.layoutInflater.inflate(R.layout.rename_note, null)
|
||||
view.note_name.setText(note.title)
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
|
@ -1,8 +1,4 @@
|
||||
package com.simplemobiletools.notes.models
|
||||
|
||||
class Note(var id: Int, var title: String, var value: String, val type: Int) {
|
||||
data class Note(var id: Int, var title: String, var value: String, val type: Int)
|
||||
|
||||
override fun equals(other: Any?) = other != null && this.toString() == other.toString()
|
||||
|
||||
override fun toString() = "Note {id=$id, title=$title, value=$value, type=$type}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user