mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Merge API from back-end to Search Fragment
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,36 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M415.89,279.29L415.89,279.29c0,-89.48 -72.85,-161.98 -161.98,-161.98c-42.6,0 -82.72,17.5 -107.98,41.35l0,0c-34.44,30.86 -54,74.5 -54,120.62l0,0c0,45.33 18.97,89.23 54,120.62l0,0c30.31,26.94 67.92,41.35 107.98,41.35C342.28,441.26 415.89,369.54 415.89,279.29z"
|
||||
android:fillColor="#E4EAF8"/>
|
||||
<path
|
||||
android:pathData="M253.91,172.84c-58.69,0 -106.44,47.75 -106.44,106.44s47.75,106.44 106.44,106.44c58.69,0 106.44,-47.75 106.44,-106.44S312.6,172.84 253.91,172.84z"
|
||||
android:fillColor="#D8DCE5"/>
|
||||
<path
|
||||
android:pathData="M165.93,399.91L165.93,399.91c-71.95,-64.48 -72.04,-176.69 0,-241.25l0,0c23.29,-22 59.22,-38.58 98.08,-41.03c-3.34,-0.21 -6.71,-0.32 -10.11,-0.32c-42.6,0 -82.72,17.5 -107.98,41.35l0,0c-71.95,64.48 -72.04,176.69 0,241.25l0,0c30.31,26.94 67.92,41.35 107.98,41.35c3.33,0 6.64,-0.11 9.92,-0.31C227.56,438.73 193.68,424.58 165.93,399.91z"
|
||||
android:fillColor="#D8DCE5"/>
|
||||
<path
|
||||
android:pathData="M167.47,279.29c0,-55.32 42.42,-100.91 96.44,-105.97c-3.29,-0.31 -6.63,-0.47 -10,-0.47c-58.69,0 -106.44,47.75 -106.44,106.44c0,58.69 47.75,106.44 106.44,106.44c3.37,0 6.71,-0.17 10,-0.47C209.89,380.2 167.47,334.61 167.47,279.29z"
|
||||
android:fillColor="#C3C8D1"/>
|
||||
<path
|
||||
android:pathData="M118.99,78C93.91,71.28 64.83,98.51 54.03,138.82c-4.66,17.38 -4.04,30.22 0.17,39.74c8.37,18.9 9.28,40.28 3.93,60.25L8.53,423.93c-2.45,9.15 2.98,18.56 12.13,21.02l0,0c9.15,2.45 18.56,-2.98 21.02,-12.13L91.28,247.69c5.35,-19.97 16.83,-38.02 33.53,-50.21C155.16,175.34 160.35,89.08 118.99,78z"
|
||||
android:fillColor="#FFC850"/>
|
||||
<path
|
||||
android:pathData="M28.53,423.93l49.6,-185.12c5.35,-19.97 4.44,-41.34 -3.93,-60.25c-4.21,-9.52 -4.83,-22.35 -0.17,-39.74c8.27,-30.88 27.27,-54.06 46.97,-60.21c-0.66,-0.22 -1.33,-0.43 -2.02,-0.62C93.91,71.28 64.83,98.51 54.03,138.82c-4.66,17.38 -4.04,30.22 0.17,39.74c8.37,18.9 9.28,40.28 3.93,60.25L8.53,423.93c-2.45,9.15 2.98,18.56 12.13,21.02c5.17,1.38 10.42,0.25 14.45,-2.64C29.48,438.26 26.63,431.03 28.53,423.93z"
|
||||
android:fillColor="#F9B428"/>
|
||||
<path
|
||||
android:pathData="M459.93,157.46l-83.5,22.37l7.35,27.44c1.98,7.4 7.28,13.69 14.96,16.46c11.27,4.07 19.97,13.18 23.07,24.76l49.26,183.86c2.39,8.93 11.31,14.77 20.33,12.8c9.64,-2.1 15.46,-11.79 12.94,-21.21l-48.92,-182.57c-3.18,-11.86 -1.01,-24.86 7.55,-35.23c4.79,-5.81 6.34,-13.64 4.39,-20.92L459.93,157.46z"
|
||||
android:fillColor="#FFC850"/>
|
||||
<path
|
||||
android:pathData="M491.97,432.36l-49.26,-183.86c-3.1,-11.57 -11.8,-20.69 -23.07,-24.76c-7.68,-2.77 -12.97,-9.06 -14.95,-16.46l-8.93,-32.62l-19.31,5.17l7.35,27.44c1.98,7.4 7.28,13.69 14.96,16.46c11.27,4.07 19.97,13.18 23.07,24.76l49.26,183.86c2.39,8.93 11.31,14.77 20.33,12.8c2.62,-0.57 4.94,-1.72 6.91,-3.25C495.31,439.58 493.02,436.26 491.97,432.36z"
|
||||
android:fillColor="#F9B428"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M272.21,166.73c-4.1,-0.68 -7.95,2.08 -8.63,6.17c-0.68,4.09 2.08,7.95 6.17,8.63c47.9,7.96 82.67,49.01 82.67,97.6c0,54.56 -44.38,98.94 -98.94,98.94c-54.56,0 -98.94,-44.38 -98.94,-98.94c0,-48.59 34.77,-89.64 82.67,-97.6c4.09,-0.68 6.85,-4.54 6.17,-8.63c-0.68,-4.09 -4.54,-6.85 -8.63,-6.17c-26.29,4.37 -50.38,18 -67.84,38.38c-63.12,73.71 -10.42,187.96 86.57,187.96c62.83,0 113.94,-51.11 113.94,-113.94C367.42,222.83 326.28,175.71 272.21,166.73z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M511.17,421.84l-34.07,-127.16c-1.07,-4 -5.18,-6.38 -9.19,-5.3c-4,1.07 -6.38,5.18 -5.3,9.19l34.07,127.15c0.69,2.58 0.31,5.25 -1.08,7.53c-4.49,7.38 -15.43,5.49 -17.7,-3l-49.26,-183.86c-2.67,-9.97 -8.88,-18.5 -17.04,-24.27c-9.35,-6.6 -17.93,-5.55 -20.99,-16.95l-5.41,-20.2l69,-18.49l5.5,20.51c1.35,5.04 0.25,10.35 -2.93,14.2c-9.71,11.77 -13,27.06 -9.01,41.95l5.47,20.41c1.07,4 5.18,6.38 9.19,5.3c4,-1.07 6.38,-5.18 5.3,-9.19l-5.47,-20.41c-2.72,-10.14 -0.5,-20.54 6.09,-28.52c6.26,-7.59 8.45,-17.92 5.85,-27.63l0,0c-0,-0.01 0,0.01 0,0l-31.73,-118.4c-1.07,-4 -5.18,-6.38 -9.19,-5.3c-4,1.07 -6.38,5.18 -5.3,9.19l22.35,83.39l-13.34,3.58l-22.35,-83.39c-1.07,-4 -5.18,-6.38 -9.19,-5.3c-4,1.07 -6.38,5.18 -5.3,9.19l22.35,83.39l-13.34,3.58L386.79,79.64c-1.07,-4 -5.18,-6.38 -9.19,-5.3c-4,1.07 -6.38,5.18 -5.3,9.19l22.35,83.39l-11.59,3.11c-0.9,-1.07 -1.81,-2.13 -2.73,-3.17l-21.37,-79.76c-1.07,-4 -5.18,-6.38 -9.19,-5.3c-4,1.07 -6.38,5.18 -5.3,9.19l14.97,55.88c-56.8,-45.84 -140.55,-51.16 -203.84,-6.03c4.08,-69.85 -48.34,-93.33 -86.04,-49.28c-19.8,23.13 -34.09,64.08 -22.66,89.89c7.37,16.65 8.63,36.28 3.55,55.27l-49.6,185.12c-1.71,6.36 -0.83,13.01 2.46,18.71c10.91,18.89 39.48,15.32 45.18,-5.95l36.5,-136.21c0.12,1 0.22,1.99 0.36,2.99c7.29,54.04 40.62,101.33 87.44,126.83c110.61,60.25 247.27,-18.59 250.13,-145.2l40.5,151.14c5.74,21.44 33.76,25.38 45,6.92C511.9,435.33 512.9,428.32 511.17,421.84zM34,430.71c-2.24,8.34 -13.43,9.72 -17.69,2.33c-1.29,-2.23 -1.63,-4.84 -0.96,-7.33l49.6,-185.12c5.97,-22.29 4.44,-45.45 -4.32,-65.23c-12.37,-27.94 18.04,-91.1 49.83,-91.1c40.19,0 37.19,86.79 9.51,106.99c-16.83,12.28 -30.2,31.35 -36.35,54.33L34,430.71zM253.48,433.6c-106.03,0 -183.11,-106.51 -144.65,-208.69c9.21,-14.51 18.99,-20.61 22.05,-23.15c0.05,-0.04 0.1,-0.09 0.15,-0.13c11.25,-9.41 17.97,-24.91 21.41,-39.24c63.32,-54.94 158.1,-49.14 214.34,11.84l0,0l9.34,34.84c4.81,17.96 19.25,20.7 24.83,24.03c4.65,14.87 7.01,30.35 7.01,46.04C407.95,364.31 338.65,433.6 253.48,433.6z"/>
|
||||
</vector>
|
||||
@@ -9,8 +9,10 @@
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/search_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
@@ -46,7 +48,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_search"
|
||||
tools:listitem="@layout/item_food"
|
||||
tools:listitem="@layout/item_food_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/list_category"
|
||||
@@ -54,6 +56,37 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_not_found"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/list_category"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:src="@drawable/dish"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:text="Không có kết quả cần tìm. Vui lòng tìm thử với từ khoá khác."
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textColor="@color/gray"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:indeterminateTint="@color/primaryColor"
|
||||
@@ -75,7 +108,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="191dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_height="190dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/food"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dip"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<TextView
|
||||
android:id="@+id/shop_name_text_view"
|
||||
android:text="Shop Name"
|
||||
android:textSize="16sp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/secondary"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -76,6 +76,7 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discount"
|
||||
android:text="-59%"
|
||||
android:textSize="8sp"
|
||||
android:textColor="@color/red"
|
||||
|
||||
Reference in New Issue
Block a user