taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 823cfac4a30224146c544c62310dc835f83f51f5
parent 2e67d84375e08d0c190b0a18d4c8762e41b9c6ba
Author: Bohdan Potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date:   Tue, 14 Apr 2026 14:12:34 +0200

[merchant-terminal] Vladas requested updates 3

Diffstat:
Mmerchant-terminal/src/main/java/net/taler/merchantpos/order/OrderAdapter.kt | 15+++++++++++----
Mmerchant-terminal/src/main/res/layout/list_item_order.xml | 16+++++++++++++++-
2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderAdapter.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderAdapter.kt @@ -82,14 +82,22 @@ internal class OrderAdapter : Adapter<OrderViewHolder>() { internal inner class OrderViewHolder(private val v: View) : RecyclerView.ViewHolder(v) { private val quantity: TextView = v.findViewById(R.id.quantity) private val name: TextView = v.findViewById(R.id.name) + private val description: TextView = v.findViewById(R.id.description) private val price: TextView = v.findViewById(R.id.price) private val image: ImageView = v.findViewById(R.id.image) fun bind(product: ConfigProduct, selected: Boolean) { v.isActivated = selected quantity.text = product.quantity.toString() - name.text = product.localizedDescription - price.text = product.totalPrice.amountStr + name.text = product.displayName + val productDescription = product.displayDescription + if (productDescription == null) { + description.visibility = GONE + } else { + description.visibility = VISIBLE + description.text = productDescription + } + price.text = product.totalPrice.toString(showSymbol = false) + " " + product.totalPrice.currency // base64 encoded image val bitmap = product.image?.base64Bitmap @@ -125,4 +133,4 @@ internal class OrderAdapter : Adapter<OrderViewHolder>() { } } -} -\ No newline at end of file +} diff --git a/merchant-terminal/src/main/res/layout/list_item_order.xml b/merchant-terminal/src/main/res/layout/list_item_order.xml @@ -55,13 +55,27 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/price" app:layout_constraintStart_toEndOf="@+id/image" app:layout_constraintTop_toTopOf="parent" tools:text="An order product item that in some cases could have a very long name" /> <TextView + android:id="@+id/description" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginTop="2dp" + android:layout_marginEnd="8dp" + android:textColor="?android:textColorSecondary" + android:visibility="gone" + app:layout_constraintEnd_toStartOf="@+id/price" + app:layout_constraintStart_toEndOf="@+id/image" + app:layout_constraintTop_toBottomOf="@+id/name" + tools:text="Subtitle" + tools:visibility="visible" /> + + <TextView android:id="@+id/price" android:layout_width="wrap_content" android:layout_height="wrap_content"