mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 13:38:41 +00:00
293 lines
12 KiB
XML
293 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".Activity.FoodDetailActivity">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/app_bar_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
>
|
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
android:id="@+id/collapsing"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="250dp"
|
|
android:fitsSystemWindows="true"
|
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
app:contentScrim="#0e0d0e"
|
|
>
|
|
|
|
<com.denzcoskun.imageslider.ImageSlider
|
|
android:id="@+id/slider"
|
|
app:iss_auto_cycle="true"
|
|
app:iss_delay="0"
|
|
app:iss_period="3000"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
/>
|
|
|
|
<ImageView
|
|
android:id="@+id/back_image"
|
|
android:layout_width="28dp"
|
|
android:layout_height="wrap_content"
|
|
android:src="@drawable/back_button"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginTop="25dp"
|
|
android:background="@drawable/circle_button"
|
|
android:translationZ="90dp"
|
|
android:padding="8dp"/>
|
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:id="@+id/food_detail"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
|
>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/content_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
>
|
|
|
|
|
|
<LinearLayout
|
|
android:id="@+id/linear_layout_1"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
>
|
|
<TextView
|
|
android:id="@+id/food_name_text_view"
|
|
android:textSize="40sp"
|
|
android:text="Food Name"
|
|
android:textColor="@color/black"
|
|
android:fontFamily="@font/bebas"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="20dp"
|
|
android:layout_weight="0.8"
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="60dp"
|
|
android:layout_weight="0.2"
|
|
android:orientation="vertical"
|
|
android:layout_gravity="bottom"
|
|
>
|
|
|
|
<TextView
|
|
android:id="@+id/discount"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="-89%"
|
|
android:textSize="18sp"
|
|
android:textColor="@color/red"
|
|
android:layout_gravity="right"
|
|
/>
|
|
<ImageView
|
|
android:id="@+id/favorite_icon"
|
|
android:src="@drawable/baseline_favorite_border_24"
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_gravity="right"
|
|
/>
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/shop_name_text_view"
|
|
android:textSize="20sp"
|
|
android:text="Shop Name"
|
|
android:textColor="@color/secondary"
|
|
android:fontFamily="@font/opensans"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/linear_layout_1"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/description_text_view"
|
|
android:text="Description"
|
|
android:textSize="18sp"
|
|
android:fontFamily="@font/bebas"
|
|
android:textColor="@color/black"
|
|
android:layout_marginTop="20dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/shop_name_text_view"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/content_description_text_view"
|
|
android:text="@string/text_description"
|
|
android:fontFamily="@font/opensans"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp"
|
|
app:layout_constraintTop_toBottomOf="@id/description_text_view"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/constraintLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="30dp"
|
|
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/linear_layout_3"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:orientation="vertical"
|
|
>
|
|
<TextView
|
|
android:text="Quantity"
|
|
android:fontFamily="@font/bebas"
|
|
android:textColor="@color/primaryColor"
|
|
android:textSize="15sp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
/>
|
|
|
|
<com.mcdev.quantitizerlibrary.HorizontalQuantitizer
|
|
android:id="@+id/quantity_option"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="-10dp"
|
|
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:orientation="vertical"
|
|
>
|
|
|
|
<TextView
|
|
android:id="@+id/total_text_view"
|
|
android:text="Price"
|
|
android:fontFamily="@font/bebas"
|
|
android:textColor="@color/black"
|
|
android:textSize="15sp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="right"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/price"
|
|
android:text="25.000 VND"
|
|
android:fontFamily="@font/bebas"
|
|
android:textColor="@color/primaryColor"
|
|
android:textSize="30sp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/add_to_basket_button"
|
|
style="@style/DefaultSolid"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="40dp"
|
|
android:layout_marginStart="40dp"
|
|
android:layout_marginEnd="40dp"
|
|
android:fontFamily="@font/bebas"
|
|
android:padding="10dp"
|
|
android:text="Add to basket - 15000 VND"
|
|
android:textSize="18sp"
|
|
app:layout_constraintTop_toBottomOf="@id/constraintLayout"
|
|
/>
|
|
|
|
<View
|
|
android:id="@+id/line"
|
|
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:backgroundTint="@color/yellow"
|
|
android:textColor="@color/black"
|
|
android:fontFamily="@font/opensans"
|
|
android:textAllCaps="false"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="20dp"
|
|
android:drawableLeft="@drawable/pencil"
|
|
/>
|
|
|
|
<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
|
|
android:id="@+id/recycler_view_review"
|
|
tools:listitem="@layout/item_review"
|
|
android:layout_width="match_parent"
|
|
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>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progress_bar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal|center_vertical"
|
|
android:visibility="gone"
|
|
android:indeterminateTint="@color/primaryColor"
|
|
/>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |