|
|
@ -117,7 +117,6 @@ class EditHabitActivity : AppCompatActivity() {
|
|
|
|
binding.notesInput.setText(habit.description)
|
|
|
|
binding.notesInput.setText(habit.description)
|
|
|
|
binding.unitInput.setText(habit.unit)
|
|
|
|
binding.unitInput.setText(habit.unit)
|
|
|
|
binding.targetInput.setText(habit.targetValue.toString())
|
|
|
|
binding.targetInput.setText(habit.targetValue.toString())
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
habitType = HabitType.fromInt(intent.getIntExtra("habitType", HabitType.YES_NO.value))
|
|
|
|
habitType = HabitType.fromInt(intent.getIntExtra("habitType", HabitType.YES_NO.value))
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -371,11 +370,12 @@ class EditHabitActivity : AppCompatActivity() {
|
|
|
|
else -> getString(R.string.widget_action_increment)
|
|
|
|
else -> getString(R.string.widget_action_increment)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
binding.incrementInput.setText(increment.toString())
|
|
|
|
binding.incrementInput.setText(increment.toString())
|
|
|
|
if (increment != 0.0)
|
|
|
|
if (increment != 0.0) {
|
|
|
|
binding.incrementRightBox.visibility = View.VISIBLE
|
|
|
|
binding.incrementRightBox.visibility = View.VISIBLE
|
|
|
|
else
|
|
|
|
} else {
|
|
|
|
binding.incrementRightBox.visibility = View.GONE
|
|
|
|
binding.incrementRightBox.visibility = View.GONE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun populateTargetType() {
|
|
|
|
private fun populateTargetType() {
|
|
|
|
binding.targetTypePicker.text = when (targetType) {
|
|
|
|
binding.targetTypePicker.text = when (targetType) {
|
|
|
|