Skip to content

Commit e351189

Browse files
committed
fix: update the payment UI imageView logic for card inserting status
1 parent 63a52f0 commit e351189

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

pos_android_studio_demo/pos_android_app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ android {
3131
applicationId "com.dspread.pos_android_app"
3232
minSdk 24
3333
targetSdk 34
34-
versionCode 123
35-
versionName "8.2.6-2601081442"
34+
versionCode 124
35+
versionName "8.2.6-2601091139"
3636
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3737
ndk {
3838
// Set up supported SO library architecture

pos_android_studio_demo/pos_android_app/src/main/res/layout/activity_payment_default.xml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<layout xmlns:binding="http://schemas.android.com/tools">
2+
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:binding="http://schemas.android.com/tools">
35

46
<data>
57
<import type="android.view.View" />
@@ -8,8 +10,7 @@
810
type="com.dspread.pos.ui.payment.PaymentViewModel" />
911
</data>
1012

11-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
12-
xmlns:app="http://schemas.android.com/apk/res-auto"
13+
<RelativeLayout
1314
android:id="@+id/rel_sale_details"
1415
android:layout_width="match_parent"
1516
android:layout_height="match_parent"
@@ -19,7 +20,7 @@
1920
<LinearLayout
2021
android:layout_width="match_parent"
2122
android:layout_height="match_parent"
22-
android:gravity="center_vertical"
23+
android:gravity="center_horizontal"
2324
android:orientation="vertical">
2425

2526
<!-- amount display -->
@@ -80,8 +81,9 @@
8081
android:visibility="@{viewModel.showPinpad ? View.GONE : View.VISIBLE}"/>
8182
</RelativeLayout>
8283

83-
<!-- common AnimationView-->
84-
<!-- android:visibility="@{viewModel.showPinpad ? View.GONE : View.VISIBLE}"-->
84+
85+
86+
<!-- card guide AnimationView-->
8587
<com.airbnb.lottie.LottieAnimationView
8688
android:id="@+id/animation_view"
8789
android:layout_width="wrap_content"
@@ -99,7 +101,7 @@
99101
android:layout_marginBottom="10dp"
100102
android:gravity="center"
101103
android:orientation="horizontal"
102-
android:visibility="@{viewModel.showResultStatus ? View.GONE : View.VISIBLE}"
104+
android:visibility="@{viewModel.showResultStatus|| viewModel.cardsInsertedStatus ? View.GONE : View.VISIBLE}"
103105
>
104106

105107
<ImageView
@@ -203,15 +205,19 @@
203205
android:textStyle="bold" />
204206
</LinearLayout>
205207
</LinearLayout>
208+
206209
</LinearLayout>
210+
<!-- card insert AnimationView-->
207211
<com.airbnb.lottie.LottieAnimationView
208-
android:visibility="@{viewModel.cardsInsertedStatus ? View.VISIBLE : View.GONE}"
209-
android:layout_width="wrap_content"
212+
android:id="@+id/animation_view_insert"
213+
android:layout_width="match_parent"
210214
android:layout_height="wrap_content"
215+
android:layout_gravity="bottom"
211216
android:layout_marginLeft="10dp"
212217
android:layout_marginRight="10dp"
213-
android:layout_alignParentBottom="true"
218+
android:visibility="@{viewModel.cardsInsertedStatus ? View.VISIBLE : View.GONE}"
214219
app:lottie_autoPlay="true"
220+
android:layout_alignParentBottom="true"
215221
app:lottie_fileName="insert_icc_card.json"
216222
app:lottie_imageAssetsFolder="iccimages/"
217223
app:lottie_loop="false" />

0 commit comments

Comments
 (0)