From bee3f5ce016c5168dfe80bc1d158e2044839e55b Mon Sep 17 00:00:00 2001
From: Nezumi <123229563+Nez27@users.noreply.github.com>
Date: Sun, 19 Feb 2023 10:38:59 +0700
Subject: [PATCH] Add product detail screen
---
.idea/discord.xml | 2 +-
app/build.gradle | 6 +-
app/src/main/AndroidManifest.xml | 16 +-
.../foodify/Activity/FoodDetailActivity.java | 55 +++++
.../foodify/Model/Food/FoodAdapter.java | 11 +
app/src/main/res/drawable/circle_button.xml | 6 +
.../main/res/layout/activity_food_detail.xml | 218 ++++++++++++++++++
app/src/main/res/layout/fragment_home.xml | 19 +-
app/src/main/res/values/colors.xml | 2 +-
app/src/main/res/values/strings.xml | 2 +
10 files changed, 311 insertions(+), 26 deletions(-)
create mode 100644 app/src/main/java/com/capstone/foodify/Activity/FoodDetailActivity.java
create mode 100644 app/src/main/res/drawable/circle_button.xml
create mode 100644 app/src/main/res/layout/activity_food_detail.xml
diff --git a/.idea/discord.xml b/.idea/discord.xml
index 30bab2a..d8e9561 100644
--- a/.idea/discord.xml
+++ b/.idea/discord.xml
@@ -1,7 +1,7 @@
-
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 7b41aec..3553988 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -26,6 +26,8 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
+
}
dependencies {
@@ -44,13 +46,11 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.denzcoskun:ImageSlideshow:0.1.0'
-
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.github.smarteist:autoimageslider:1.4.0'
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
-
+ implementation "com.github.kojofosu:Quantitizer:1.6.7"
implementation 'com.squareup.picasso:picasso:2.71828'
-
implementation "com.paulrybitskyi.persistentsearchview:persistentsearchview:1.1.4"
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4edcba0..d79e67a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -7,31 +7,31 @@
+
+ android:noHistory="true" />
+ android:noHistory="true" />
+ android:noHistory="true" />
+ android:exported="false" />
slideModels = new ArrayList<>();
+ slideModels.add(new SlideModel("https://firebasestorage.googleapis.com/v0/b/foodify-55954.appspot.com/o/basil-minced-pork-with-rice-fried-egg.jpg?alt=media&token=838ea008-5525-44fb-a5b0-cf77877184a8", null));
+ slideModels.add(new SlideModel("https://firebasestorage.googleapis.com/v0/b/foodify-55954.appspot.com/o/delicious-vietnamese-food-including-pho-ga-noodles-spring-rolls-white-table.jpg?alt=media&token=c19919c7-f69d-4933-b955-3fa627e411a0", null));
+ slideModels.add(new SlideModel("https://firebasestorage.googleapis.com/v0/b/foodify-55954.appspot.com/o/fried-spring-rolls-cutting-board.jpg?alt=media&token=a2f64b21-578c-427f-bbc8-767280ee82e0", null));
+ slideModels.add(new SlideModel("https://firebasestorage.googleapis.com/v0/b/foodify-55954.appspot.com/o/pieces-chicken-fillet-with-mushrooms-stewed-tomato-sauce-with-boiled-broccoli-rice-proper-nutrition-healthy-lifestyle-dietetic-menu-top-view.jpg?alt=media&token=deded3b6-db7b-4a8d-9720-66ddef916d6f", null));
+ slideModels.add(new SlideModel("https://firebasestorage.googleapis.com/v0/b/foodify-55954.appspot.com/o/top-view-fresh-delicious-vietnamese-food-table.jpg?alt=media&token=eec8a996-2a12-4b47-b369-8d4d1e91b20a", null));
+
+ imageSlider.setImageList(slideModels, ScaleTypes.FIT);
+
+ back_image.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ onBackPressed();
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/capstone/foodify/Model/Food/FoodAdapter.java b/app/src/main/java/com/capstone/foodify/Model/Food/FoodAdapter.java
index ffff9b7..ac9e792 100644
--- a/app/src/main/java/com/capstone/foodify/Model/Food/FoodAdapter.java
+++ b/app/src/main/java/com/capstone/foodify/Model/Food/FoodAdapter.java
@@ -1,6 +1,7 @@
package com.capstone.foodify.Model.Food;
import android.content.Context;
+import android.content.Intent;
import android.text.Layout;
import android.view.LayoutInflater;
import android.view.View;
@@ -11,6 +12,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
+import com.capstone.foodify.Activity.FoodDetailActivity;
import com.capstone.foodify.R;
import com.squareup.picasso.Picasso;
@@ -35,6 +37,15 @@ public class FoodAdapter extends RecyclerView.Adapter
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_food_detail.xml b/app/src/main/res/layout/activity_food_detail.xml
new file mode 100644
index 0000000..fe9be6a
--- /dev/null
+++ b/app/src/main/res/layout/activity_food_detail.xml
@@ -0,0 +1,218 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
index fd0103d..d28244f 100644
--- a/app/src/main/res/layout/fragment_home.xml
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -8,14 +8,15 @@
+ android:layout_height="wrap_content"
+ android:layout_marginStart="10dp"
+ android:layout_marginEnd="10dp"
+ >
#A3A3A3
#F99928
#ACA5A5
-
+ #FF0000
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 98f4750..5d2baca 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -39,4 +39,6 @@
Food Title
Basket Icon
Favourite Icon
+ Non odit iusto delectus maxime sit placeat voluptatum dolorem. Dolores quos rerum iusto.
+ Beatae totam ab veritatis aliquid tenetur qui ut. Quia ut dolorum enim et. .
\ No newline at end of file