diff --git a/uhabits-android/src/main/java/org/isoron/uhabits/activities/habits/edit/HabitTypeDialog.kt b/uhabits-android/src/main/java/org/isoron/uhabits/activities/habits/edit/HabitTypeDialog.kt index 350509207..d7acd8f03 100644 --- a/uhabits-android/src/main/java/org/isoron/uhabits/activities/habits/edit/HabitTypeDialog.kt +++ b/uhabits-android/src/main/java/org/isoron/uhabits/activities/habits/edit/HabitTypeDialog.kt @@ -51,6 +51,12 @@ class HabitTypeDialog : AppCompatDialogFragment() { dismiss() } + binding.buttonHabitGroup.setOnClickListener { + val intent = IntentFactory().startEditGroupActivity(requireActivity()) + startActivity(intent) + dismiss() + } + binding.background.setOnClickListener { dismiss() } diff --git a/uhabits-android/src/main/res/layout/activity_edit_habit_group.xml b/uhabits-android/src/main/res/layout/activity_edit_habit_group.xml new file mode 100644 index 000000000..758df4849 --- /dev/null +++ b/uhabits-android/src/main/res/layout/activity_edit_habit_group.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uhabits-android/src/main/res/layout/select_habit_type.xml b/uhabits-android/src/main/res/layout/select_habit_type.xml index 95775cb29..dd5a8a370 100644 --- a/uhabits-android/src/main/res/layout/select_habit_type.xml +++ b/uhabits-android/src/main/res/layout/select_habit_type.xml @@ -67,6 +67,25 @@ android:text="@string/measurable_example" /> + + + + + + + diff --git a/uhabits-android/src/main/res/values/strings.xml b/uhabits-android/src/main/res/values/strings.xml index 5f632e03c..6332a1370 100644 --- a/uhabits-android/src/main/res/values/strings.xml +++ b/uhabits-android/src/main/res/values/strings.xml @@ -64,6 +64,8 @@ Off Create habit Edit habit + Create habit group + Edit habit group Check Later Welcome @@ -208,6 +210,8 @@ e.g. Did you wake up early today? Did you exercise? Did you play chess? Measurable e.g. How many miles did you run today? How many pages did you read? + Habit Group + A group to organize similar habits together. E.g. Exercise: Running, Cycling, Gym, etc. %d times per week %d times per month %d times in %d days