This commit is contained in:
2023-11-15 23:19:58 +03:00
parent e95c2f5ed8
commit 9f54b69a18
4 changed files with 7 additions and 5 deletions
@@ -20,7 +20,7 @@ fun Float.formatPrice(): String {
fun ImageView.loadImage(url: String?) {
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)
.error(R.drawable.error)
.into(this)
@@ -11,11 +11,11 @@ interface DAOInterface {
suspend fun getCategories(): Response<List<Categories>>
@GET("categories/{categoryId}/products")
suspend fun getProducts(@Path("categoryId") categoryId: Int): Response<List<Product>>
@GET("products/{id}")
suspend fun getProducts(@Path("id") id: Int): Response<List<Product>>
@GET("JsonSearch")
@GET("search")
suspend fun getSearch(): Response<List<Product>>
}
+1 -1
View File
@@ -127,7 +127,7 @@
android:layout_weight="1"
android:gravity="center"
android:textAllCaps="false"
android:textColor="@color/primary"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
tools:text="150,00 ₺" />
@@ -122,6 +122,7 @@
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:textColor="@color/black"
android:layout_marginBottom="5dp"
android:layout_weight="1"
android:background="@drawable/custom_edittext"
@@ -196,6 +197,7 @@
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
android:textColor="@color/black"
android:background="@drawable/custom_edittext"
android:gravity="left"
android:hint="@string/order_address"