mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 13:38:41 +00:00
Improve UI Food Detail
This commit is contained in:
@@ -53,4 +53,5 @@ dependencies {
|
||||
implementation "com.github.kojofosu:Quantitizer:1.6.7"
|
||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
||||
implementation "com.paulrybitskyi.persistentsearchview:persistentsearchview:1.1.4"
|
||||
implementation 'com.github.ome450901:SimpleRatingBar:1.5.1'
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="18dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
|
||||
</vector>
|
||||
@@ -190,7 +190,7 @@
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Sub Total"
|
||||
android:text="Total"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp"
|
||||
@@ -200,7 +200,7 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:text="$15.00"
|
||||
android:text="25.000 VND"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:textSize="30sp"
|
||||
@@ -217,18 +217,65 @@
|
||||
style="@style/DefaultSolid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:padding="10dp"
|
||||
android:text="Add to basket"
|
||||
android:textSize="20sp"
|
||||
android:text="Add to basket - 15000 VND"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/constraintLayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#c0c0c0"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/add_to_basket_button"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_layout_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/add_to_basket_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/rating_button"
|
||||
android:text="Rating"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textAllCaps="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:drawableLeft="@drawable/baseline_edit_24"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/count_rating_text_view"
|
||||
android:text="235 rating"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
tools:listitem="@layout/item_review"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_layout_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/user_name_text_view"
|
||||
android:text="User A"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<com.willy.ratingbar.ScaleRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="26dp"
|
||||
app:srb_starPadding="5dp"
|
||||
android:clickable="false"
|
||||
app:srb_starWidth="12dp"
|
||||
app:srb_starHeight="12dp"
|
||||
app:srb_numStars="5"
|
||||
app:srb_rating="5"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name_text_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="-5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user"
|
||||
android:text="Food is good!"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user