forked from penguin86/luna-tracker
Compare commits
16 Commits
c636e48c7e
...
38930fe269
| Author | SHA1 | Date | |
|---|---|---|---|
| 38930fe269 | |||
| f9b060ddc9 | |||
| cee1b5a9f2 | |||
| c8c678b294 | |||
| 45e798ac3b | |||
| a06264091b | |||
| 1e82c94d83 | |||
| 85567cce77 | |||
| 80a51ea8ef | |||
| 28679a4a66 | |||
| f73d3562a9 | |||
| 8a2932b1e7 | |||
| 2af8989777 | |||
| b417fe48a6 | |||
| a887d9f29f | |||
| 44748506ff |
@@ -468,8 +468,10 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
if (hideDurationButtons) {
|
||||
durationButtons.visibility = View.GONE
|
||||
d.setMessage(getString(R.string.log_sleep_dialog_description_start))
|
||||
} else {
|
||||
durationButtons.visibility = View.VISIBLE
|
||||
d.setMessage(event.getDialogMessage(this))
|
||||
|
||||
fun adjust(minutes: Int) {
|
||||
duration += minutes * 60
|
||||
@@ -514,6 +516,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
fun addAmountEvent(event: LunaEvent) {
|
||||
setToPreviousQuantity(event)
|
||||
askAmountValue(event, true) { saveEvent(event) }
|
||||
}
|
||||
|
||||
@@ -530,7 +533,7 @@ class MainActivity : AppCompatActivity() {
|
||||
R.array.AmountLabels,
|
||||
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))
|
||||
|
||||
val dateTV = dialogView.findViewById<TextView>(R.id.dialog_date_picker)
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
<string name="log_unknown_dialog_description"></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_start">Start sleep cycle:</string>
|
||||
|
||||
<string name="measurement_unit_liquid_base_metric" translatable="false">ml</string>
|
||||
<string name="measurement_unit_weight_base_metric" translatable="false">g</string>
|
||||
|
||||
Reference in New Issue
Block a user