mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-03 02:01:05 +02:00
replace custom extension functions with the filepickers ones
This commit is contained in:
parent
2567680dac
commit
fb003eaee9
@ -11,6 +11,8 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.simplemobiletools.filepicker.extensions.toast
|
||||
import com.simplemobiletools.filepicker.extensions.value
|
||||
import com.simplemobiletools.notes.MyWidgetProvider
|
||||
import com.simplemobiletools.notes.R
|
||||
import com.simplemobiletools.notes.TYPE_NOTE
|
||||
@ -19,8 +21,6 @@ import com.simplemobiletools.notes.databases.DBHelper
|
||||
import com.simplemobiletools.notes.dialogs.NewNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.OpenNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.WidgetNoteDialog
|
||||
import com.simplemobiletools.notes.extensions.toast
|
||||
import com.simplemobiletools.notes.extensions.value
|
||||
import com.simplemobiletools.notes.models.Note
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
|
||||
|
@ -3,10 +3,10 @@ package com.simplemobiletools.notes.dialogs
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.view.WindowManager
|
||||
import com.simplemobiletools.filepicker.extensions.toast
|
||||
import com.simplemobiletools.filepicker.extensions.value
|
||||
import com.simplemobiletools.notes.R
|
||||
import com.simplemobiletools.notes.databases.DBHelper
|
||||
import com.simplemobiletools.notes.extensions.toast
|
||||
import com.simplemobiletools.notes.extensions.value
|
||||
import kotlinx.android.synthetic.main.new_note.view.*
|
||||
|
||||
class NewNoteDialog(val activity: Activity, val db: DBHelper, callback: (title: String) -> Unit) {
|
||||
|
@ -1,6 +0,0 @@
|
||||
package com.simplemobiletools.notes.extensions
|
||||
|
||||
import android.content.Context
|
||||
import android.widget.Toast
|
||||
|
||||
fun Context.toast(id: Int) = Toast.makeText(this, id, Toast.LENGTH_SHORT).show()
|
@ -1,5 +0,0 @@
|
||||
package com.simplemobiletools.notes.extensions
|
||||
|
||||
import android.widget.EditText
|
||||
|
||||
val EditText.value: String get() = text.toString().trim()
|
Loading…
x
Reference in New Issue
Block a user