v1
This commit is contained in:
@@ -20,7 +20,7 @@ fun Float.formatPrice(): String {
|
|||||||
|
|
||||||
fun ImageView.loadImage(url: String?) {
|
fun ImageView.loadImage(url: String?) {
|
||||||
Picasso.get()
|
Picasso.get()
|
||||||
.load("https://my-json-server.typicode.com/YarikHumster/SweetShopViki/$url")
|
.load("https://static.1000.menu/img/content-v2/05/f0/6402/chizkeik-iz-smetani_1579155436_15_max.jpg")
|
||||||
.placeholder(R.drawable.loading)
|
.placeholder(R.drawable.loading)
|
||||||
.error(R.drawable.error)
|
.error(R.drawable.error)
|
||||||
.into(this)
|
.into(this)
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ interface DAOInterface {
|
|||||||
suspend fun getCategories(): Response<List<Categories>>
|
suspend fun getCategories(): Response<List<Categories>>
|
||||||
|
|
||||||
|
|
||||||
@GET("categories/{categoryId}/products")
|
@GET("products/{id}")
|
||||||
suspend fun getProducts(@Path("categoryId") categoryId: Int): Response<List<Product>>
|
suspend fun getProducts(@Path("id") id: Int): Response<List<Product>>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GET("JsonSearch")
|
@GET("search")
|
||||||
suspend fun getSearch(): Response<List<Product>>
|
suspend fun getSearch(): Response<List<Product>>
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/primary"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="150,00 ₺" />
|
tools:text="150,00 ₺" />
|
||||||
|
|||||||
@@ -122,6 +122,7 @@
|
|||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/custom_edittext"
|
android:background="@drawable/custom_edittext"
|
||||||
@@ -196,6 +197,7 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
android:background="@drawable/custom_edittext"
|
android:background="@drawable/custom_edittext"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:hint="@string/order_address"
|
android:hint="@string/order_address"
|
||||||
|
|||||||
Reference in New Issue
Block a user