Skip to content

Commit e69105b

Browse files
committed
Fix height property
1 parent 82411a9 commit e69105b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.35.4]
5+
6+
### Fixed
7+
- The priceHeight property of the CheckoutBar contains now the outer margin
8+
49
## [0.35.3]
510

611
### Changes

ui/src/main/java/io/snabble/sdk/ui/cart/CheckoutBar.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CheckoutBar @JvmOverloads constructor(
3939
private val payButton: Button
4040
private val articleCount: TextView
4141
private val priceSum: TextView
42+
private val priceContainer: FrameLayout
4243
private val paymentSelectionHelper: PaymentSelectionHelper
4344
private val project = SnabbleUI.getProject()
4445
private var cart: ShoppingCart = project.shoppingCart
@@ -47,7 +48,8 @@ class CheckoutBar @JvmOverloads constructor(
4748
}
4849

4950
val priceHeight: Int
50-
get() = priceSum.height + priceSum.marginTop * 2
51+
get() = priceSum.height + priceContainer.marginTop * 2
52+
5153
init {
5254
LayoutInflater.from(context).inflate(R.layout.snabble_view_checkout_bar, this, true)
5355
orientation = VERTICAL
@@ -57,6 +59,7 @@ class CheckoutBar @JvmOverloads constructor(
5759
payButton = findViewById(R.id.pay)
5860
articleCount = findViewById(R.id.article_count)
5961
priceSum = findViewById(R.id.price_sum)
62+
priceContainer = findViewById(R.id.sum_container)
6063
paymentSelectionHelper = PaymentSelectionHelper.getInstance()
6164
paymentSelectionHelper.selectedEntry.observe(UIUtils.getHostActivity(getContext()) as FragmentActivity, { update() })
6265
paySelectorButton.setOnClickListener { paymentSelectionHelper.showDialog(UIUtils.getHostFragmentActivity(getContext())) }

0 commit comments

Comments
 (0)