From 89dca1575e96f2a90e4a01a6d3d84fe3c68372b5 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Wed, 12 Apr 2023 11:39:57 +0200 Subject: [PATCH] refs #4830 --- .../inventario/adapter/InventoryAdapter.kt | 5 ++++ .../inventario/model/ItemInventaryVO.kt | 3 ++- .../main/res/layout/item_inventary_row.xml | 23 ++++++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.kt index 40b54584..782f43fc 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.kt @@ -42,6 +42,11 @@ class InventoryAdapter ( }else{ itemProducer.visibility = View.VISIBLE } + if (item.itemColour.isNullOrEmpty()){ + itemColor.visibility = View.GONE + }else{ + itemColor.visibility = View.VISIBLE + } itemNicho.setOnClickListener { onInvetoryNichoClickListener.onInvetoryNichoClickListener(item) } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt index 5e8147bc..fdfb1bb0 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt @@ -9,7 +9,8 @@ class ItemInventaryVO( var upstairs: String = "", var nicho: Int = 0, var isError: Boolean = false, - var errorMessage: String = "" + var errorMessage: String = "", + var itemColour: String = "" ) class InventaryListVO( diff --git a/app/src/main/res/layout/item_inventary_row.xml b/app/src/main/res/layout/item_inventary_row.xml index 9759e62d..c6c8f8b1 100644 --- a/app/src/main/res/layout/item_inventary_row.xml +++ b/app/src/main/res/layout/item_inventary_row.xml @@ -56,8 +56,26 @@ android:gravity="left" tool:text="Alstromeria Blanca"/> + + - + - - +