forked from penguin86/luna-tracker
Added type Note
This commit is contained in:
@ -210,6 +210,8 @@ class MainActivity : AppCompatActivity() {
|
||||
d.setView(dialogView)
|
||||
val notesET = dialogView.findViewById<EditText>(R.id.notes_edittext)
|
||||
val qtyET = dialogView.findViewById<EditText>(R.id.notes_qty_edittext)
|
||||
if (lunaEvent.type == LunaEvent.TYPE_NOTE || lunaEvent.type == LunaEvent.TYPE_CUSTOM)
|
||||
qtyET.visibility = View.GONE
|
||||
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
|
||||
val qtyStr = qtyET.text.toString()
|
||||
if (qtyStr.isNotEmpty()) {
|
||||
@ -440,6 +442,10 @@ class MainActivity : AppCompatActivity() {
|
||||
logEvent(LunaEvent(LunaEvent.TYPE_ENEMA))
|
||||
dismiss()
|
||||
})
|
||||
contentView.findViewById<View>(R.id.button_note).setOnClickListener({
|
||||
askNotes(LunaEvent(LunaEvent.TYPE_NOTE))
|
||||
dismiss()
|
||||
})
|
||||
contentView.findViewById<View>(R.id.button_custom).setOnClickListener({
|
||||
Toast.makeText(anchor.context, "TODO: Implement custom events", Toast.LENGTH_SHORT).show()
|
||||
dismiss()
|
||||
|
Reference in New Issue
Block a user