|
|
@ -43,7 +43,11 @@ public class FoodInfoFragment extends Fragment { |
|
|
|
TextView restaurantServing = rootView.findViewById(R.id.food_serving_restaurant); |
|
|
|
restaurantServing.setText(getString(R.string.food_serving_restaurant_placeholder, food.getRestaurantName())); |
|
|
|
TextView calories = rootView.findViewById(R.id.food_calories); |
|
|
|
calories.setText(getString(R.string.food_calories_placeholder, food.getCalories())); |
|
|
|
if (food.getCalories() != -1) { |
|
|
|
calories.setText(getString(R.string.food_calories_placeholder, food.getCalories())); |
|
|
|
} else { |
|
|
|
calories.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
TextView rating = rootView.findViewById(R.id.food_rating); |
|
|
|
if (food.getRating() != -1) { |
|
|
|
rating.setText(getString(R.string.food_rating_placeholder, food.getRating())); |
|
|
|