mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Add search view
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
@@ -1,14 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment.SearchFragment">
|
||||
tools:context=".Fragment.SearchFragment"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
<com.paulrybitskyi.persistentsearchview.PersistentSearchView
|
||||
android:id="@+id/search_view"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_search"
|
||||
tools:listitem="@layout/list_foods"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/search_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="157dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="190dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="230dp"
|
||||
android:layout_height="189dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="157dp"
|
||||
android:layout_height="157dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/food"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dip"
|
||||
@@ -33,10 +33,11 @@
|
||||
<ImageView
|
||||
android:id="@+id/favourite_icon"
|
||||
android:src="@drawable/baseline_favorite_border_24"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/transparent_background"
|
||||
app:layout_constraintEnd_toEndOf="@id/image_view"
|
||||
app:layout_constraintBottom_toBottomOf="@id/image_view"
|
||||
android:contentDescription="@string/favourite_icon"
|
||||
@@ -45,13 +46,13 @@
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:layout_height="34dp"
|
||||
android:text="@string/food_title"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/opensans"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/image_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
@@ -61,7 +62,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="2dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -69,7 +70,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price"
|
||||
android:textSize="20sp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:fontFamily="@font/bebas"
|
||||
android:layout_marginStart="6dp"
|
||||
@@ -82,9 +83,9 @@
|
||||
android:src="@drawable/basket_icon"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="0.2"
|
||||
android:layout_weight="0.18"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:contentDescription="@string/basket_icon"
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user