16 Commits

Author SHA1 Message Date
c636e48c7e layout: replace menu icon with utf8 character
The three dot menu icosn looks odd when stretched
due to the dynamic menu feature. Thus replace it
with the hamburger menu character that looks better
when scaled.
2026-01-12 22:46:05 +01:00
f39882edc4 MainActivity: sort events before saving
Also replace notifyItemInserted since it does not
call the adapter to redraw the row striping when
a new event is added.
2026-01-12 22:46:05 +01:00
0683f396ae StatisticsActivity: rework all statistics
Improve the overall code.
2026-01-12 22:46:02 +01:00
2a446ea7d3 NumericUtils: remove possible trailing whitespace 2026-01-11 21:55:07 +01:00
b753703ff3 MainActivity: do not switch logbook on reload 2026-01-11 21:55:07 +01:00
f5bd345e23 LunaEvent: reorganize event text getters
Use method names that better reflect
the use of the returned text.
2026-01-11 21:55:07 +01:00
dc0cd6353c MainAcitivty: add dynamic header setting
The setting allows to build the menu and
popup list to be populated by the frequency
of events that has been created.
This also makes the 'no breastfeeding' setting irrelevant.
2026-01-11 21:55:07 +01:00
7a0343f464 LunaEvent: use enum class for event types
This helps to have compile errors when some
case it not handled while adding a new type.
The enum class can also be interated over
to create a complete drop down list.
2026-01-11 21:55:03 +01:00
389514ec4f MainActivity: increase bottle volume to 340ml
This is the maximum amount found in sold bottles.
2026-01-11 21:53:46 +01:00
7608fc756b gradle: use uniform implementation directive for sardine-android 2026-01-11 21:53:46 +01:00
ced76d449e gradle: avoid inclusion of apk signing blobs
See https://android.izzysoft.de/articles/named/iod-scan-apkchecks?lang=en#blobs
2026-01-11 21:53:46 +01:00
64e4fbbba2 gradle: set compileSDK/targetSdk to 36 2026-01-11 21:53:46 +01:00
98cf9587e8 StatisticsActivity: add statistics for bottle and sleep events 2026-01-11 21:53:46 +01:00
3faaf6d6f0 MainActivity: show save button if any values has changed 2026-01-11 21:53:46 +01:00
86721fbbae MainActivity: use unique templates for notes 2026-01-11 21:53:46 +01:00
155d53a6f0 LunaEvent: add sleep event 2026-01-11 21:53:41 +01:00
2 changed files with 1 additions and 5 deletions

View File

@@ -468,10 +468,8 @@ class MainActivity : AppCompatActivity() {
if (hideDurationButtons) { if (hideDurationButtons) {
durationButtons.visibility = View.GONE durationButtons.visibility = View.GONE
d.setMessage(getString(R.string.log_sleep_dialog_description_start))
} else { } else {
durationButtons.visibility = View.VISIBLE durationButtons.visibility = View.VISIBLE
d.setMessage(event.getDialogMessage(this))
fun adjust(minutes: Int) { fun adjust(minutes: Int) {
duration += minutes * 60 duration += minutes * 60
@@ -516,7 +514,6 @@ class MainActivity : AppCompatActivity() {
} }
fun addAmountEvent(event: LunaEvent) { fun addAmountEvent(event: LunaEvent) {
setToPreviousQuantity(event)
askAmountValue(event, true) { saveEvent(event) } askAmountValue(event, true) { saveEvent(event) }
} }
@@ -533,7 +530,7 @@ class MainActivity : AppCompatActivity() {
R.array.AmountLabels, R.array.AmountLabels,
android.R.layout.simple_spinner_dropdown_item android.R.layout.simple_spinner_dropdown_item
) )
// set pre-selected item and ensure the quantity to index is in bounds
spinner.setSelection(event.quantity.coerceIn(0, spinner.count - 1)) spinner.setSelection(event.quantity.coerceIn(0, spinner.count - 1))
val dateTV = dialogView.findViewById<TextView>(R.id.dialog_date_picker) val dateTV = dialogView.findViewById<TextView>(R.id.dialog_date_picker)

View File

@@ -131,7 +131,6 @@
<string name="log_unknown_dialog_description"></string> <string name="log_unknown_dialog_description"></string>
<string name="log_weight_dialog_description">Insert the weight:</string> <string name="log_weight_dialog_description">Insert the weight:</string>
<string name="log_sleep_dialog_description">Set sleep duration:</string> <string name="log_sleep_dialog_description">Set sleep duration:</string>
<string name="log_sleep_dialog_description_start">Start sleep cycle:</string>
<string name="measurement_unit_liquid_base_metric" translatable="false">ml</string> <string name="measurement_unit_liquid_base_metric" translatable="false">ml</string>
<string name="measurement_unit_weight_base_metric" translatable="false">g</string> <string name="measurement_unit_weight_base_metric" translatable="false">g</string>