Browse Source

Complete FoodActivity, DrinkActivity, Minor fixes

master
Apostolos Fanakis 6 years ago
parent
commit
09dd7b0086
  1. 3
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/drink/DrinkActivity.java
  2. 71
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/drink/fragments/DrinkRatingsFragment.java
  3. 3
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/food/FoodActivity.java
  4. 71
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/food/fragments/FoodRatingsFragment.java
  5. 3
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantDrinksFragment.java
  6. 3
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantFoodsFragment.java
  7. 1
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantInfoFragment.java
  8. 18
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantRatingsAdapter.java
  9. 18
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantRatingsFragment.java
  10. 18
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/ItemRating.java
  11. 12
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/Rating.java
  12. 18
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/RestaurantRating.java
  13. 70
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/utils/ItemRatingsAdapter.java
  14. 10
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/item_rating_row.xml
  15. 5
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/restaurant_item_row.xml
  16. 37
      UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/restaurant_rating_row.xml

3
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/drink/DrinkActivity.java

@ -10,6 +10,7 @@ import androidx.viewpager.widget.ViewPager;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.activities.drink.fragments.DrinkInfoFragment;
import gr.auth.databases.flavours.activities.drink.fragments.DrinkIngredientsFragment;
import gr.auth.databases.flavours.activities.drink.fragments.DrinkRatingsFragment;
import gr.auth.databases.flavours.base.BaseActivity;
import android.os.Bundle;
@ -101,7 +102,7 @@ public class DrinkActivity extends BaseActivity {
RestaurantPagerAdapter adapter = new RestaurantPagerAdapter(getSupportFragmentManager());
adapter.addFrag(DrinkInfoFragment.newInstance(64), "INFO");
adapter.addFrag(DrinkIngredientsFragment.newInstance(64), "INGREDIENTS");
/*adapter.addFrag(DrinkRatingsFragment.newInstance(64), "RATINGS");*/
adapter.addFrag(DrinkRatingsFragment.newInstance(64), "RATINGS");
viewPager.setAdapter(adapter);
}

71
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/drink/fragments/DrinkRatingsFragment.java

@ -0,0 +1,71 @@
package gr.auth.databases.flavours.activities.drink.fragments;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.model.ItemRating;
import gr.auth.databases.flavours.utils.ItemRatingsAdapter;
public class DrinkRatingsFragment extends Fragment {
public DrinkRatingsFragment() {
// Required empty public constructor
}
private static final String DRINK_ID = "DRINK_ID";
private int drinkId;
public static DrinkRatingsFragment newInstance(int drinkId) {
DrinkRatingsFragment fragment = new DrinkRatingsFragment();
Bundle args = new Bundle();
args.putInt(DRINK_ID, drinkId);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
assert getArguments() != null;
drinkId = getArguments().getInt(DRINK_ID);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.reusable_recycler_list, container, false);
ArrayList<ItemRating> ratings = new ArrayList<>();
ratings.add(new ItemRating(5, "Ανώνυμος", "Πάρα πολύ καλό!", "2018-01-04", ItemRating.PortionSize.MEDIUM));
ratings.add(new ItemRating(5, "Ανύπαρκτος", "Εξαιρετικό service.\nΘα ξαναπάω!", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(4, "Γαρδένιος ο Stoner", "-", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(4, "Μαγκούστα", "Μου άρεσε.", "2018-06-08", ItemRating.PortionSize.MEDIUM));
ratings.add(new ItemRating(5, "Νταλίκας", "Τέλειο.", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(2, "Ms Godzila", "Το φαϊ άργησε πάρα πολύ!", "2018-06-08", null));
ratings.add(new ItemRating(4, "eddie lives inside you", "-", "2018-06-08", ItemRating.PortionSize.MEDIUM));
Context context = getContext();
assert context != null;
ItemRatingsAdapter itemAdapter = new ItemRatingsAdapter(context, ratings);
RecyclerView mainContent = rootView.findViewById(R.id.recycler_list);
mainContent.setAdapter(itemAdapter);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
mainContent.setLayoutManager(layoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mainContent.getContext(),
layoutManager.getOrientation());
mainContent.addItemDecoration(dividerItemDecoration);
return rootView;
}
}

3
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/food/FoodActivity.java

@ -10,6 +10,7 @@ import androidx.viewpager.widget.ViewPager;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.activities.food.fragments.FoodInfoFragment;
import gr.auth.databases.flavours.activities.food.fragments.FoodIngredientsFragment;
import gr.auth.databases.flavours.activities.food.fragments.FoodRatingsFragment;
import gr.auth.databases.flavours.base.BaseActivity;
import android.os.Bundle;
@ -101,7 +102,7 @@ public class FoodActivity extends BaseActivity {
RestaurantPagerAdapter adapter = new RestaurantPagerAdapter(getSupportFragmentManager());
adapter.addFrag(FoodInfoFragment.newInstance(64), "INFO");
adapter.addFrag(FoodIngredientsFragment.newInstance(64), "INGREDIENTS");
/*adapter.addFrag(FoodRatingsFragment.newInstance(64), "RATINGS");*/
adapter.addFrag(FoodRatingsFragment.newInstance(64), "RATINGS");
viewPager.setAdapter(adapter);
}

71
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/food/fragments/FoodRatingsFragment.java

@ -0,0 +1,71 @@
package gr.auth.databases.flavours.activities.food.fragments;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.model.ItemRating;
import gr.auth.databases.flavours.utils.ItemRatingsAdapter;
public class FoodRatingsFragment extends Fragment {
public FoodRatingsFragment() {
// Required empty public constructor
}
private static final String FOOD_ID = "FOOD_ID";
private int foodId;
public static FoodRatingsFragment newInstance(int foodId) {
FoodRatingsFragment fragment = new FoodRatingsFragment();
Bundle args = new Bundle();
args.putInt(FOOD_ID, foodId);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
assert getArguments() != null;
foodId = getArguments().getInt(FOOD_ID);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.reusable_recycler_list, container, false);
ArrayList<ItemRating> ratings = new ArrayList<>();
ratings.add(new ItemRating(5, "Ανώνυμος", "Πάρα πολύ καλό!", "2018-01-04", ItemRating.PortionSize.MEDIUM));
ratings.add(new ItemRating(5, "Ανύπαρκτος", "Εξαιρετικό service.\nΘα ξαναπάω!", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(4, "Γαρδένιος ο Stoner", "-", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(4, "Μαγκούστα", "Μου άρεσε.", "2018-06-08", ItemRating.PortionSize.MEDIUM));
ratings.add(new ItemRating(5, "Νταλίκας", "Τέλειο.", "2018-06-08", ItemRating.PortionSize.BIG));
ratings.add(new ItemRating(2, "Ms Godzila", "Το φαϊ άργησε πάρα πολύ!", "2018-06-08", null));
ratings.add(new ItemRating(4, "eddie lives inside you", "-", "2018-06-08", ItemRating.PortionSize.MEDIUM));
Context context = getContext();
assert context != null;
ItemRatingsAdapter itemAdapter = new ItemRatingsAdapter(context, ratings);
RecyclerView mainContent = rootView.findViewById(R.id.recycler_list);
mainContent.setAdapter(itemAdapter);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
mainContent.setLayoutManager(layoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mainContent.getContext(),
layoutManager.getOrientation());
mainContent.addItemDecoration(dividerItemDecoration);
return rootView;
}
}

3
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantDrinksFragment.java

@ -56,9 +56,6 @@ public class RestaurantDrinksFragment extends BaseFragment {
mainContent.setAdapter(itemAdapter);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
mainContent.setLayoutManager(layoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mainContent.getContext(),
layoutManager.getOrientation());
mainContent.addItemDecoration(dividerItemDecoration);
return rootView;
}

3
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantFoodsFragment.java

@ -54,9 +54,6 @@ public class RestaurantFoodsFragment extends BaseFragment {
mainContent.setAdapter(itemAdapter);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
mainContent.setLayoutManager(layoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mainContent.getContext(),
layoutManager.getOrientation());
mainContent.addItemDecoration(dividerItemDecoration);
return rootView;
}

1
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantInfoFragment.java

@ -58,6 +58,7 @@ public class RestaurantInfoFragment extends BaseFragment implements OnMapReadyCa
averageRatings.setText(getString(R.string.restaurant_average_rating, 4.78));
LinearLayout averageRatingPerDiet = rootView.findViewById(R.id.restaurant_average_rating_per_diet);
averageRatingPerDiet.setVisibility(View.VISIBLE);
TextView dietRatingView = new TextView(getContext());
dietRatingView.setText(getString(R.string.restaurant_diet_average_rating, "όγκος", 4.65));
averageRatingPerDiet.addView(dietRatingView);

18
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantRatingsAdapter.java

@ -11,13 +11,13 @@ import java.util.ArrayList;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.model.Rating;
import gr.auth.databases.flavours.model.RestaurantRating;
public class RestaurantRatingsAdapter extends RecyclerView.Adapter<RestaurantRatingsAdapter.RatingViewHolder> {
private Context context;
private ArrayList<Rating> ratings;
private ArrayList<RestaurantRating> ratings;
RestaurantRatingsAdapter(Context context, ArrayList<Rating> ratings) {
RestaurantRatingsAdapter(@NonNull Context context, ArrayList<RestaurantRating> ratings) {
this.context = context;
this.ratings = ratings;
}
@ -26,7 +26,7 @@ public class RestaurantRatingsAdapter extends RecyclerView.Adapter<RestaurantRat
@Override
public RestaurantRatingsAdapter.RatingViewHolder onCreateViewHolder(@NonNull ViewGroup parent,
int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.activity_restaurant_list_row,
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.restaurant_rating_row,
parent, false);
return new RatingViewHolder(v);
}
@ -60,11 +60,11 @@ public class RestaurantRatingsAdapter extends RecyclerView.Adapter<RestaurantRat
RatingViewHolder(View v) {
super(v);
username = v.findViewById(R.id.restaurant_row_username);
date = v.findViewById(R.id.restaurant_row_date);
grade = v.findViewById(R.id.restaurant_row_grade);
accessibility = v.findViewById(R.id.restaurant_row_accessibility);
text = v.findViewById(R.id.restaurant_row_text);
username = v.findViewById(R.id.restaurant_rating_username);
date = v.findViewById(R.id.restaurant_rating_date);
grade = v.findViewById(R.id.restaurant_rating_grade);
accessibility = v.findViewById(R.id.restaurant_rating_accessibility);
text = v.findViewById(R.id.restaurant_rating_text);
}
}
}

18
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/activities/restaurant/fragments/RestaurantRatingsFragment.java

@ -13,7 +13,7 @@ import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.model.Rating;
import gr.auth.databases.flavours.model.RestaurantRating;
public class RestaurantRatingsFragment extends Fragment {
@ -44,14 +44,14 @@ public class RestaurantRatingsFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.reusable_recycler_list, container, false);
ArrayList<Rating> ratings = new ArrayList<>();
ratings.add(new Rating(5, "Ανώνυμος", "Πάρα πολύ καλό!", "2018-01-04", Rating.Accessibility.MODERATE));
ratings.add(new Rating(5, "Ανύπαρκτος", "Εξαιρετικό service.\nΘα ξαναπάω!", "2018-06-08", Rating.Accessibility.EASY));
ratings.add(new Rating(4, "Γαρδένιος ο Stoner", "-", "2018-06-08", Rating.Accessibility.EASY));
ratings.add(new Rating(4, "Μαγκούστα", "Μου άρεσε.", "2018-06-08", Rating.Accessibility.MODERATE));
ratings.add(new Rating(5, "Νταλίκας", "Τέλειο.", "2018-06-08", Rating.Accessibility.EASY));
ratings.add(new Rating(2, "Ms Godzila", "Το φαϊ άργησε πάρα πολύ!", "2018-06-08", null));
ratings.add(new Rating(4, "eddie lives inside you", "-", "2018-06-08", Rating.Accessibility.MODERATE));
ArrayList<RestaurantRating> ratings = new ArrayList<>();
ratings.add(new RestaurantRating(5, "Ανώνυμος", "Πάρα πολύ καλό!", "2018-01-04", RestaurantRating.Accessibility.MODERATE));
ratings.add(new RestaurantRating(5, "Ανύπαρκτος", "Εξαιρετικό service.\nΘα ξαναπάω!", "2018-06-08", RestaurantRating.Accessibility.EASY));
ratings.add(new RestaurantRating(4, "Γαρδένιος ο Stoner", "-", "2018-06-08", RestaurantRating.Accessibility.EASY));
ratings.add(new RestaurantRating(4, "Μαγκούστα", "Μου άρεσε.", "2018-06-08", RestaurantRating.Accessibility.MODERATE));
ratings.add(new RestaurantRating(5, "Νταλίκας", "Τέλειο.", "2018-06-08", RestaurantRating.Accessibility.EASY));
ratings.add(new RestaurantRating(2, "Ms Godzila", "Το φαϊ άργησε πάρα πολύ!", "2018-06-08", null));
ratings.add(new RestaurantRating(4, "eddie lives inside you", "-", "2018-06-08", RestaurantRating.Accessibility.MODERATE));
RestaurantRatingsAdapter itemAdapter = new RestaurantRatingsAdapter(getContext(), ratings);
RecyclerView mainContent = rootView.findViewById(R.id.recycler_list);

18
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/ItemRating.java

@ -0,0 +1,18 @@
package gr.auth.databases.flavours.model;
public class ItemRating extends Rating {
public enum PortionSize {
SMALL, MEDIUM, BIG
}
private PortionSize portionSize;
public ItemRating(int grade, String username, String text, String date, PortionSize portionSize) {
super(grade, username, text, date);
this.portionSize = portionSize;
}
public PortionSize getPortionSize() {
return portionSize;
}
}

12
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/Rating.java

@ -1,20 +1,14 @@
package gr.auth.databases.flavours.model;
public class Rating {
public enum Accessibility {
EASY, MODERATE, HARD
}
private int grade;
private String username, text, date;
private Accessibility accessibility;
public Rating(int grade, String username, String text, String date, Accessibility accessibility) {
Rating(int grade, String username, String text, String date) {
this.grade = grade;
this.username = username;
this.text = text;
this.date = date;
this.accessibility = accessibility;
}
public int getGrade() {
@ -32,8 +26,4 @@ public class Rating {
public String getDate() {
return date;
}
public Accessibility getAccessibility() {
return accessibility;
}
}

18
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/model/RestaurantRating.java

@ -0,0 +1,18 @@
package gr.auth.databases.flavours.model;
public class RestaurantRating extends Rating {
public enum Accessibility {
EASY, MODERATE, HARD
}
private Accessibility accessibility;
public RestaurantRating(int grade, String username, String text, String date, Accessibility accessibility) {
super(grade, username, text, date);
this.accessibility = accessibility;
}
public Accessibility getAccessibility() {
return accessibility;
}
}

70
UI/AndroidApp/flavoursWithoutBorders/app/src/main/java/gr/auth/databases/flavours/utils/ItemRatingsAdapter.java

@ -0,0 +1,70 @@
package gr.auth.databases.flavours.utils;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import gr.auth.databases.flavours.R;
import gr.auth.databases.flavours.model.ItemRating;
public class ItemRatingsAdapter extends RecyclerView.Adapter<ItemRatingsAdapter.RatingViewHolder> {
private Context context;
private ArrayList<ItemRating> ratings;
public ItemRatingsAdapter(@NonNull Context context, ArrayList<ItemRating> ratings) {
this.context = context;
this.ratings = ratings;
}
@NonNull
@Override
public ItemRatingsAdapter.RatingViewHolder onCreateViewHolder(@NonNull ViewGroup parent,
int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_rating_row,
parent, false);
return new RatingViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull RatingViewHolder holder, int position) {
holder.authorUsername.setText(ratings.get(position).getUsername());
holder.date.setText(ratings.get(position).getDate());
holder.grade.setText(context.getString(R.string.restaurant_row_grade_placeholder,
ratings.get(position).getGrade()));
if (ratings.get(position).getPortionSize() != null) {
holder.portionSize.setVisibility(View.VISIBLE);
holder.portionSize.setText(context.getString(R.string.restaurant_row_accessibility_placeholder,
ratings.get(position).getPortionSize().toString()));
} else {
holder.portionSize.setVisibility(View.GONE);
}
holder.text.setText(ratings.get(position).getText());
}
@Override
public int getItemCount() {
return ratings == null ? 0 : ratings.size();
}
static class RatingViewHolder extends RecyclerView.ViewHolder {
TextView authorUsername, date, grade, portionSize, text;
RatingViewHolder(View v) {
super(v);
authorUsername = v.findViewById(R.id.item__rating_author_username);
date = v.findViewById(R.id.item__rating_date);
grade = v.findViewById(R.id.item__rating_grade);
portionSize = v.findViewById(R.id.item__rating_portion_size);
text = v.findViewById(R.id.item__rating_text);
}
}
}

10
UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/activity_restaurant_list_row.xml → UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/item_rating_row.xml

@ -8,30 +8,30 @@
android:orientation="vertical">
<TextView
android:id="@+id/restaurant_row_username"
android:id="@+id/item__rating_author_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:textStyle="bold" />
<TextView
android:id="@+id/restaurant_row_date"
android:id="@+id/item__rating_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp" />
<TextView
android:id="@+id/restaurant_row_grade"
android:id="@+id/item__rating_grade"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/restaurant_row_accessibility"
android:id="@+id/item__rating_portion_size"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/restaurant_row_text"
android:id="@+id/item__rating_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

5
UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/restaurant_item_row.xml

@ -16,5 +16,8 @@
<TextView
android:id="@+id/restaurant_item_row_item"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:textColor="@color/colorAccent"
android:textSize="16sp" />
</androidx.cardview.widget.CardView>

37
UI/AndroidApp/flavoursWithoutBorders/app/src/main/res/layout/restaurant_rating_row.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="6dp"
android:orientation="vertical">
<TextView
android:id="@+id/restaurant_rating_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:textStyle="bold" />
<TextView
android:id="@+id/restaurant_rating_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp" />
<TextView
android:id="@+id/restaurant_rating_grade"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/restaurant_rating_accessibility"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/restaurant_rating_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Loading…
Cancel
Save