diff --git a/Diaguard/src/main/java/com/faltenreich/diaguard/ui/fragment/FoodEditFragment.java b/Diaguard/src/main/java/com/faltenreich/diaguard/ui/fragment/FoodEditFragment.java index 1a13e55dc..385141839 100644 --- a/Diaguard/src/main/java/com/faltenreich/diaguard/ui/fragment/FoodEditFragment.java +++ b/Diaguard/src/main/java/com/faltenreich/diaguard/ui/fragment/FoodEditFragment.java @@ -29,7 +29,7 @@ public class FoodEditFragment extends BaseFoodFragment { @BindView(R.id.food_edit_name) StickyHintInput nameInput; @BindView(R.id.food_edit_brand) StickyHintInput brandInput; @BindView(R.id.food_edit_ingredients) StickyHintInput ingredientsInput; - @BindView(R.id.food_edit_value) StickyHintInput valueInput; + @BindView(R.id.food_edit_carbohydrates) StickyHintInput valueInput; public FoodEditFragment() { super(R.layout.fragment_food_edit, R.string.food_new); @@ -69,9 +69,6 @@ public boolean onOptionsItemSelected(MenuItem item) { } private void init() { - - valueInput.setHint(PreferenceHelper.getInstance().getUnitName(Measurement.Category.MEAL)); - Food food = getFood(); if (food != null) { setTitle(R.string.food_edit); @@ -110,9 +107,7 @@ private void store() { food.setName(nameInput.getText()); food.setBrand(brandInput.getText()); food.setIngredients(ingredientsInput.getText()); - food.setCarbohydrates(PreferenceHelper.getInstance().formatCustomToDefaultUnit( - Measurement.Category.MEAL, - NumberUtils.parseNumber(valueInput.getText()))); + food.setCarbohydrates(NumberUtils.parseNumber(valueInput.getText())); FoodDao.getInstance().createOrUpdate(food); Events.post(new FoodSavedEvent(food)); diff --git a/Diaguard/src/main/res/layout/fragment_food_edit.xml b/Diaguard/src/main/res/layout/fragment_food_edit.xml index fa661981c..b0a0b1110 100644 --- a/Diaguard/src/main/res/layout/fragment_food_edit.xml +++ b/Diaguard/src/main/res/layout/fragment_food_edit.xml @@ -81,9 +81,10 @@ app:tintColor="@color/gray_darker" /> diff --git a/Diaguard/src/main/res/values-de/strings.xml b/Diaguard/src/main/res/values-de/strings.xml index 573c10279..d360ddd71 100644 --- a/Diaguard/src/main/res/values-de/strings.xml +++ b/Diaguard/src/main/res/values-de/strings.xml @@ -135,6 +135,7 @@ Ändert sich jede Stunde Kohlenhydrate + Kohlenhydrate pro 100 g Kalorien Fett Gesättigte Fettsäuren diff --git a/Diaguard/src/main/res/values-es/strings.xml b/Diaguard/src/main/res/values-es/strings.xml index 0ec4dc641..679c3b444 100644 --- a/Diaguard/src/main/res/values-es/strings.xml +++ b/Diaguard/src/main/res/values-es/strings.xml @@ -331,5 +331,6 @@ Grasa Grasa saturada Fibra + Carbohidratos por 100 g diff --git a/Diaguard/src/main/res/values-fr/strings.xml b/Diaguard/src/main/res/values-fr/strings.xml index 97ae851b7..4d7a4dfcf 100644 --- a/Diaguard/src/main/res/values-fr/strings.xml +++ b/Diaguard/src/main/res/values-fr/strings.xml @@ -330,5 +330,6 @@ Graisse Graisses saturées Fibra + Glucides par 100 g \ No newline at end of file diff --git a/Diaguard/src/main/res/values/strings.xml b/Diaguard/src/main/res/values/strings.xml index 297911f57..a782c051b 100644 --- a/Diaguard/src/main/res/values/strings.xml +++ b/Diaguard/src/main/res/values/strings.xml @@ -157,6 +157,7 @@ Changes every hour Carbohydrates + Carbohydrates per 100 g Energy Fat Saturated fat