7 Commits

Author SHA1 Message Date
6b1a82d7d0 add sleep event 2025-11-14 21:42:35 +01:00
2c502444d6 MainActivity: allow amount for poo and pee events
An unspecified amount has also been added
to have the same semantics as before.

During these actions, the strings for title
and description of dialogs have been cleaned up.
2025-11-14 18:09:21 +01:00
d71e9cdf95 strings: rename scale to weight in identifiers 2025-11-14 18:07:42 +01:00
b58350543a LunaEvent: remove quantity when the value is invalid 2025-11-14 18:07:27 +01:00
1cfaf17d47 notes: add icons to use previous/next event as template 2025-11-14 18:01:24 +01:00
b271f63cb7 MainActivity: preset quantity of bottle, weight and temperature
Use the quantity of previous events
to initialize new events.
2025-11-14 09:26:16 +01:00
563e431c1d events: allow editing of all used values
1. Allow to change the date/time and
other relevant values of an event
on creation and after it was created.

2. Harmonize layout file names and
variable names.
2025-11-13 11:40:59 +01:00

View File

@@ -427,7 +427,7 @@ class MainActivity : AppCompatActivity() {
event.quantity = (toSeconds - fromSeconds).toInt() event.quantity = (toSeconds - fromSeconds).toInt()
onPositive() onPositive()
} else { } else {
Toast.makeText(this, R.string.toast_date_error, Toast.LENGTH_SHORT).show() Toast.makeText(applicationContext, R.string.toast_date_error, Toast.LENGTH_SHORT).show()
} }
dialogInterface.dismiss() dialogInterface.dismiss()
} }
@@ -602,7 +602,7 @@ class MainActivity : AppCompatActivity() {
event.quantity = quantity event.quantity = quantity
onPositive() onPositive()
} else { } else {
Toast.makeText(this, R.string.toast_integer_error, Toast.LENGTH_SHORT).show() Toast.makeText(applicationContext, R.string.toast_integer_error, Toast.LENGTH_SHORT).show()
} }
} else { } else {
@@ -899,7 +899,7 @@ class MainActivity : AppCompatActivity() {
runOnUiThread({ runOnUiThread({
setLoading(false) setLoading(false)
loadLogbookList() loadLogbookList()
Toast.makeText(this@MainActivity, getString(R.string.logbook_created) + logbookName, Toast.LENGTH_SHORT).show() Toast.makeText(applicationContext, getString(R.string.logbook_created) + logbookName, Toast.LENGTH_SHORT).show()
}) })
} }
@@ -1056,7 +1056,7 @@ class MainActivity : AppCompatActivity() {
setLoading(false) setLoading(false)
Toast.makeText( Toast.makeText(
this@MainActivity, applicationContext,
if (lastEventAdded != null) if (lastEventAdded != null)
R.string.toast_event_added R.string.toast_event_added
else else
@@ -1118,7 +1118,7 @@ class MainActivity : AppCompatActivity() {
runOnUiThread({ runOnUiThread({
setLoading(false) setLoading(false)
Toast.makeText(this@MainActivity, R.string.toast_event_add_error, Toast.LENGTH_SHORT).show() Toast.makeText(applicationContext, R.string.toast_event_add_error, Toast.LENGTH_SHORT).show()
recyclerView.adapter?.notifyDataSetChanged() recyclerView.adapter?.notifyDataSetChanged()
savingEvent(false) savingEvent(false)
}) })