Panagiotis Triantafyllou

coupon activity fixes

...@@ -30,7 +30,7 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene ...@@ -30,7 +30,7 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
30 @Override 30 @Override
31 public void onCreate(Bundle savedInstanceState) { 31 public void onCreate(Bundle savedInstanceState) {
32 super.onCreate(savedInstanceState); 32 super.onCreate(savedInstanceState);
33 - setContentView(R.layout.activity_bill_payment); 33 + setContentView(R.layout.activity_bill_payment);
34 34
35 mIvBack = findViewById(R.id.iv_bill_payment_close); 35 mIvBack = findViewById(R.id.iv_bill_payment_close);
36 mPayBtn = findViewById(R.id.button_pay); 36 mPayBtn = findViewById(R.id.button_pay);
...@@ -47,9 +47,11 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene ...@@ -47,9 +47,11 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
47 public void onClick(View view) { 47 public void onClick(View view) {
48 if (view.getId() == R.id.iv_bill_payment_close) { 48 if (view.getId() == R.id.iv_bill_payment_close) {
49 onBackPressed(); 49 onBackPressed();
50 - } else if (view.getId() == R.id.button_pay) { 50 + return;
51 + }
52 + if (view.getId() == R.id.button_pay) {
51 // open dialog 53 // open dialog
52 - showDialog(); 54 + showDialog();
53 } 55 }
54 } 56 }
55 57
......
...@@ -2,10 +2,12 @@ package ly.warp.sdk.activities; ...@@ -2,10 +2,12 @@ package ly.warp.sdk.activities;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
4 import android.app.Dialog; 4 import android.app.Dialog;
5 +import android.graphics.Paint;
5 import android.os.Bundle; 6 import android.os.Bundle;
6 import android.view.View; 7 import android.view.View;
7 import android.widget.Button; 8 import android.widget.Button;
8 import android.widget.ImageView; 9 import android.widget.ImageView;
10 +import android.widget.TextView;
9 11
10 import ly.warp.sdk.R; 12 import ly.warp.sdk.R;
11 13
...@@ -21,6 +23,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -21,6 +23,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
21 // =========================================================== 23 // ===========================================================
22 24
23 private ImageView mIvBack; 25 private ImageView mIvBack;
26 + private TextView mTvTerms;
24 27
25 // =========================================================== 28 // ===========================================================
26 // Methods for/from SuperClass/Interfaces 29 // Methods for/from SuperClass/Interfaces
...@@ -32,6 +35,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -32,6 +35,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
32 setContentView(R.layout.activity_coupon_info); 35 setContentView(R.layout.activity_coupon_info);
33 36
34 mIvBack = findViewById(R.id.iv_coupon_info_back); 37 mIvBack = findViewById(R.id.iv_coupon_info_back);
38 + mTvTerms = findViewById(R.id.tv_terms);
35 39
36 initViews(); 40 initViews();
37 } 41 }
...@@ -54,6 +58,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -54,6 +58,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
54 58
55 private void initViews() { 59 private void initViews() {
56 mIvBack.setOnClickListener(this); 60 mIvBack.setOnClickListener(this);
61 + mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
57 } 62 }
58 63
59 // =========================================================== 64 // ===========================================================
......
1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:app="http://schemas.android.com/apk/res-auto" 2 xmlns:app="http://schemas.android.com/apk/res-auto"
3 - xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent" 3 android:layout_width="match_parent"
5 android:layout_height="match_parent" 4 android:layout_height="match_parent"
6 android:background="@android:color/white"> 5 android:background="@android:color/white">
...@@ -42,8 +41,7 @@ ...@@ -42,8 +41,7 @@
42 <androidx.constraintlayout.widget.ConstraintLayout 41 <androidx.constraintlayout.widget.ConstraintLayout
43 android:layout_width="match_parent" 42 android:layout_width="match_parent"
44 android:layout_height="match_parent" 43 android:layout_height="match_parent"
45 - android:background="@android:color/white" 44 + android:background="@android:color/white">
46 - android:paddingTop="5dp">
47 45
48 <androidx.constraintlayout.widget.ConstraintLayout 46 <androidx.constraintlayout.widget.ConstraintLayout
49 android:id="@+id/cl_loyalty_info_view_inner" 47 android:id="@+id/cl_loyalty_info_view_inner"
...@@ -57,19 +55,24 @@ ...@@ -57,19 +55,24 @@
57 55
58 <ImageView 56 <ImageView
59 android:id="@+id/imageView6" 57 android:id="@+id/imageView6"
60 - android:layout_width="444dp" 58 + android:layout_width="match_parent"
61 android:layout_height="224dp" 59 android:layout_height="224dp"
62 - android:scaleType="fitXY" 60 + android:clipToOutline="true"
61 + android:scaleType="centerCrop"
63 android:src="@drawable/carousel_banner" 62 android:src="@drawable/carousel_banner"
64 app:layout_constraintStart_toStartOf="parent" 63 app:layout_constraintStart_toStartOf="parent"
65 app:layout_constraintTop_toTopOf="parent" /> 64 app:layout_constraintTop_toTopOf="parent" />
66 65
67 <TextView 66 <TextView
68 android:id="@+id/textView13" 67 android:id="@+id/textView13"
69 - android:layout_width="320dp" 68 + android:layout_width="match_parent"
70 - android:layout_height="43dp" 69 + android:layout_height="wrap_content"
71 android:layout_marginTop="32dp" 70 android:layout_marginTop="32dp"
71 + android:paddingHorizontal="32dp"
72 android:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" 72 android:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!"
73 + android:textColor="#415564"
74 + android:textSize="18sp"
75 + android:textStyle="bold"
73 app:layout_constraintEnd_toEndOf="parent" 76 app:layout_constraintEnd_toEndOf="parent"
74 app:layout_constraintHorizontal_bias="0.509" 77 app:layout_constraintHorizontal_bias="0.509"
75 app:layout_constraintStart_toStartOf="parent" 78 app:layout_constraintStart_toStartOf="parent"
...@@ -77,10 +80,13 @@ ...@@ -77,10 +80,13 @@
77 80
78 <TextView 81 <TextView
79 android:id="@+id/textView14" 82 android:id="@+id/textView14"
80 - android:layout_width="324dp" 83 + android:layout_width="match_parent"
81 - android:layout_height="52dp" 84 + android:layout_height="wrap_content"
82 - android:layout_marginTop="32dp" 85 + android:layout_marginTop="16dp"
86 + android:paddingHorizontal="32dp"
83 android:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" 87 android:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης"
88 + android:textColor="#415564"
89 + android:textSize="16sp"
84 app:layout_constraintEnd_toEndOf="parent" 90 app:layout_constraintEnd_toEndOf="parent"
85 app:layout_constraintStart_toStartOf="parent" 91 app:layout_constraintStart_toStartOf="parent"
86 app:layout_constraintTop_toBottomOf="@+id/textView13" /> 92 app:layout_constraintTop_toBottomOf="@+id/textView13" />
...@@ -89,8 +95,11 @@ ...@@ -89,8 +95,11 @@
89 android:id="@+id/textView15" 95 android:id="@+id/textView15"
90 android:layout_width="wrap_content" 96 android:layout_width="wrap_content"
91 android:layout_height="wrap_content" 97 android:layout_height="wrap_content"
92 - android:layout_marginTop="32dp" 98 + android:layout_marginTop="48dp"
93 android:text="Κωδικός Κουπονιού" 99 android:text="Κωδικός Κουπονιού"
100 + android:textColor="#415564"
101 + android:textFontWeight="600"
102 + android:textSize="16sp"
94 app:layout_constraintEnd_toEndOf="parent" 103 app:layout_constraintEnd_toEndOf="parent"
95 app:layout_constraintHorizontal_bias="0.498" 104 app:layout_constraintHorizontal_bias="0.498"
96 app:layout_constraintStart_toStartOf="parent" 105 app:layout_constraintStart_toStartOf="parent"
...@@ -98,16 +107,17 @@ ...@@ -98,16 +107,17 @@
98 107
99 <TextView 108 <TextView
100 android:id="@+id/textView16" 109 android:id="@+id/textView16"
101 - android:layout_width="320dp" 110 + android:layout_width="match_parent"
102 - android:layout_height="53dp" 111 + android:layout_height="50dp"
103 - android:layout_marginTop="20dp" 112 + android:layout_marginHorizontal="32dp"
113 + android:layout_marginTop="12dp"
104 android:background="@drawable/banner_border_light_blue" 114 android:background="@drawable/banner_border_light_blue"
105 android:gravity="center" 115 android:gravity="center"
106 android:text="1A2C378" 116 android:text="1A2C378"
107 - android:textFontWeight="1000" 117 + android:textColor="#415564"
108 android:textSize="25dp" 118 android:textSize="25dp"
119 + android:textStyle="bold"
109 app:layout_constraintEnd_toEndOf="parent" 120 app:layout_constraintEnd_toEndOf="parent"
110 - app:layout_constraintHorizontal_bias="0.483"
111 app:layout_constraintStart_toStartOf="parent" 121 app:layout_constraintStart_toStartOf="parent"
112 app:layout_constraintTop_toBottomOf="@+id/textView15" /> 122 app:layout_constraintTop_toBottomOf="@+id/textView15" />
113 123
...@@ -115,34 +125,23 @@ ...@@ -115,34 +125,23 @@
115 android:id="@+id/textView17" 125 android:id="@+id/textView17"
116 android:layout_width="wrap_content" 126 android:layout_width="wrap_content"
117 android:layout_height="wrap_content" 127 android:layout_height="wrap_content"
118 - android:layout_marginTop="16dp" 128 + android:layout_marginTop="24dp"
119 android:text="Το κουπόνι ισχύει έως 05/12/2022" 129 android:text="Το κουπόνι ισχύει έως 05/12/2022"
130 + android:textColor="#415564"
120 app:layout_constraintEnd_toEndOf="parent" 131 app:layout_constraintEnd_toEndOf="parent"
121 app:layout_constraintStart_toStartOf="parent" 132 app:layout_constraintStart_toStartOf="parent"
122 app:layout_constraintTop_toBottomOf="@+id/textView16" /> 133 app:layout_constraintTop_toBottomOf="@+id/textView16" />
123 134
124 - <TextView
125 - android:id="@+id/textView18"
126 - android:layout_width="wrap_content"
127 - android:layout_height="wrap_content"
128 - android:layout_marginTop="32dp"
129 - android:text="Όροι χρήσης"
130 - app:layout_constraintBottom_toBottomOf="parent"
131 - app:layout_constraintEnd_toEndOf="parent"
132 - app:layout_constraintStart_toStartOf="parent"
133 - app:layout_constraintTop_toBottomOf="@+id/ll_get_gift" />
134 -
135 <LinearLayout 135 <LinearLayout
136 android:id="@+id/ll_gift_it" 136 android:id="@+id/ll_gift_it"
137 - android:layout_width="318dp" 137 + android:layout_width="match_parent"
138 - android:layout_height="52dp" 138 + android:layout_height="50dp"
139 - android:layout_marginTop="68dp" 139 + android:layout_marginHorizontal="32dp"
140 + android:layout_marginTop="64dp"
140 android:background="@drawable/button_border_dark_blue" 141 android:background="@drawable/button_border_dark_blue"
141 - android:clickable="true"
142 android:gravity="center" 142 android:gravity="center"
143 android:orientation="horizontal" 143 android:orientation="horizontal"
144 app:layout_constraintEnd_toEndOf="parent" 144 app:layout_constraintEnd_toEndOf="parent"
145 - app:layout_constraintHorizontal_bias="0.494"
146 app:layout_constraintStart_toStartOf="parent" 145 app:layout_constraintStart_toStartOf="parent"
147 app:layout_constraintTop_toBottomOf="@+id/textView17"> 146 app:layout_constraintTop_toBottomOf="@+id/textView17">
148 147
...@@ -151,7 +150,6 @@ ...@@ -151,7 +150,6 @@
151 android:layout_height="25dp" 150 android:layout_height="25dp"
152 android:layout_marginRight="15dp" 151 android:layout_marginRight="15dp"
153 android:adjustViewBounds="true" 152 android:adjustViewBounds="true"
154 - android:scaleType="fitCenter"
155 android:src="@drawable/phone_white" /> 153 android:src="@drawable/phone_white" />
156 154
157 <TextView 155 <TextView
...@@ -160,16 +158,17 @@ ...@@ -160,16 +158,17 @@
160 android:gravity="center" 158 android:gravity="center"
161 android:text="Κάντο δώρο!" 159 android:text="Κάντο δώρο!"
162 android:textColor="@color/white" 160 android:textColor="@color/white"
163 - android:textSize="17dp" /> 161 + android:textSize="17dp"
162 + android:textStyle="bold" />
164 </LinearLayout> 163 </LinearLayout>
165 164
166 <LinearLayout 165 <LinearLayout
167 android:id="@+id/ll_get_gift" 166 android:id="@+id/ll_get_gift"
168 - android:layout_width="318dp" 167 + android:layout_width="match_parent"
169 - android:layout_height="52dp" 168 + android:layout_height="50dp"
169 + android:layout_marginHorizontal="32dp"
170 android:layout_marginTop="24dp" 170 android:layout_marginTop="24dp"
171 android:background="@drawable/shape_cos_gradient2" 171 android:background="@drawable/shape_cos_gradient2"
172 - android:clickable="true"
173 android:gravity="center" 172 android:gravity="center"
174 android:orientation="horizontal" 173 android:orientation="horizontal"
175 app:layout_constraintEnd_toEndOf="parent" 174 app:layout_constraintEnd_toEndOf="parent"
...@@ -183,9 +182,23 @@ ...@@ -183,9 +182,23 @@
183 android:gravity="center" 182 android:gravity="center"
184 android:text="Πάρε το δώρο σου" 183 android:text="Πάρε το δώρο σου"
185 android:textColor="@color/white" 184 android:textColor="@color/white"
186 - android:textSize="17dp" /> 185 + android:textSize="17dp"
186 + android:textStyle="bold" />
187 </LinearLayout> 187 </LinearLayout>
188 188
189 + <TextView
190 + android:id="@+id/tv_terms"
191 + android:layout_width="wrap_content"
192 + android:layout_height="wrap_content"
193 + android:layout_marginTop="32dp"
194 + android:text="Όροι χρήσης"
195 + android:textColor="#415564"
196 + android:textFontWeight="600"
197 + android:textSize="15sp"
198 + app:layout_constraintEnd_toEndOf="parent"
199 + app:layout_constraintStart_toStartOf="parent"
200 + app:layout_constraintTop_toBottomOf="@+id/ll_get_gift" />
201 +
189 </androidx.constraintlayout.widget.ConstraintLayout> 202 </androidx.constraintlayout.widget.ConstraintLayout>
190 </androidx.constraintlayout.widget.ConstraintLayout> 203 </androidx.constraintlayout.widget.ConstraintLayout>
191 </ScrollView> 204 </ScrollView>
......