This commit is contained in:
Sergio De la torre 2023-04-12 11:39:57 +02:00
parent 88efda26d7
commit 89dca1575e
3 changed files with 27 additions and 4 deletions

View File

@ -42,6 +42,11 @@ class InventoryAdapter (
}else{ }else{
itemProducer.visibility = View.VISIBLE itemProducer.visibility = View.VISIBLE
} }
if (item.itemColour.isNullOrEmpty()){
itemColor.visibility = View.GONE
}else{
itemColor.visibility = View.VISIBLE
}
itemNicho.setOnClickListener { itemNicho.setOnClickListener {
onInvetoryNichoClickListener.onInvetoryNichoClickListener(item) onInvetoryNichoClickListener.onInvetoryNichoClickListener(item)
} }

View File

@ -9,7 +9,8 @@ class ItemInventaryVO(
var upstairs: String = "", var upstairs: String = "",
var nicho: Int = 0, var nicho: Int = 0,
var isError: Boolean = false, var isError: Boolean = false,
var errorMessage: String = "" var errorMessage: String = "",
var itemColour: String = ""
) )
class InventaryListVO( class InventaryListVO(

View File

@ -56,8 +56,26 @@
android:gravity="left" android:gravity="left"
tool:text="Alstromeria Blanca"/> tool:text="Alstromeria Blanca"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/verdnatura_black_5"
android:paddingLeft="@dimen/pasilleros_margin_main_menu"
android:paddingRight="@dimen/pasilleros_margin_main_menu">
<TextView
android:id="@+id/itemColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.itemColour}"
android:textSize="@dimen/body2"
android:textStyle="bold"
android:textColor="@color/verdnatura_white"
android:layout_weight="2"
android:gravity="left"
tool:text="Amarillo" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
@ -78,9 +96,8 @@
android:layout_weight="2" android:layout_weight="2"
android:gravity="left" android:gravity="left"
tool:text="80" /> tool:text="80" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"