thkouk00

payment success dialog v2

1 package ly.warp.sdk.activities; 1 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.os.Bundle; 5 import android.os.Bundle;
5 import android.view.View; 6 import android.view.View;
6 import android.widget.Button; 7 import android.widget.Button;
...@@ -48,11 +49,7 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene ...@@ -48,11 +49,7 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
48 onBackPressed(); 49 onBackPressed();
49 } else if (view.getId() == R.id.button_pay) { 50 } else if (view.getId() == R.id.button_pay) {
50 // open dialog 51 // open dialog
51 - // PopUpDialogNew dialogMyEac = PopUpDialogNew.dialogErrorWindow(BaseActivity.this, 52 + showDialog();
52 - // getString(R.string.error_wrong_response),
53 - // getString(R.string.error_wrong_credentials),
54 - // null
55 - // );
56 } 53 }
57 } 54 }
58 55
...@@ -65,6 +62,12 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene ...@@ -65,6 +62,12 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
65 mPayBtn.setOnClickListener(this); 62 mPayBtn.setOnClickListener(this);
66 } 63 }
67 64
65 + private void showDialog() {
66 + Dialog dialog = new Dialog(this);
67 + dialog.setContentView(R.layout.payment_success_dialog);
68 + dialog.getWindow().setBackgroundDrawableResource(R.drawable.banner_border_white);
69 + dialog.show();
70 + }
68 // =========================================================== 71 // ===========================================================
69 // Inner and Anonymous Classes 72 // Inner and Anonymous Classes
70 // =========================================================== 73 // ===========================================================
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
3 + <solid android:color="#FFFFFF"/>
4 + <stroke android:width="3dp" android:color="#FFFFFF" />
5 + <corners android:radius="10dp"/>
6 + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
7 +</shape>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto" 3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 xmlns:tools="http://schemas.android.com/tools" 4 xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent" 5 android:layout_width="match_parent"
6 - android:layout_height="match_parent"> 6 + android:layout_height="550dp"
7 + android:layout_gravity="center_horizontal">
7 8
8 <TextView 9 <TextView
9 android:id="@+id/textView5" 10 android:id="@+id/textView5"
10 - android:layout_width="177dp" 11 + android:layout_width="243dp"
11 - android:layout_height="35dp" 12 + android:layout_height="55dp"
12 - android:layout_marginTop="36dp" 13 + android:layout_alignParentStart="true"
14 + android:layout_alignParentTop="true"
15 + android:layout_alignParentEnd="true"
16 + android:layout_marginStart="54dp"
17 + android:layout_marginTop="38dp"
18 + android:layout_marginEnd="63dp"
19 + android:gravity="center"
13 android:text="Συγχαρητήρια!" 20 android:text="Συγχαρητήρια!"
14 android:textColor="#0072C9" 21 android:textColor="#0072C9"
15 - android:textSize="25dp"
16 android:textFontWeight="1000" 22 android:textFontWeight="1000"
17 - android:gravity="center" 23 + android:textSize="25dp"
18 - app:layout_constraintEnd_toEndOf="parent" 24 + app:layout_constraintTop_toTopOf="parent"
19 - app:layout_constraintStart_toStartOf="parent" 25 + app:layout_constraintVertical_bias="0.46"
20 - app:layout_constraintTop_toTopOf="parent" /> 26 + tools:layout_editor_absoluteX="87dp" />
21 27
22 <TextView 28 <TextView
23 android:id="@+id/textView6" 29 android:id="@+id/textView6"
24 - android:layout_width="269dp" 30 + android:layout_width="336dp"
25 android:layout_height="42dp" 31 android:layout_height="42dp"
26 - android:layout_marginTop="24dp" 32 + android:layout_below="@+id/textView5"
33 + android:layout_alignStart="@+id/textView5"
34 + android:layout_alignEnd="@+id/textView5"
35 + android:layout_marginStart="-16dp"
36 + android:layout_marginTop="3dp"
37 + android:layout_marginEnd="-24dp"
38 + android:layout_marginBottom="24dp"
27 android:gravity="center" 39 android:gravity="center"
28 android:text="Κέρδισες 1GB για 7 ημέρες!" 40 android:text="Κέρδισες 1GB για 7 ημέρες!"
29 android:textColor="#5B5B5B" 41 android:textColor="#5B5B5B"
30 - android:textSize="18dp" 42 + android:textSize="18dp" />
31 - app:layout_constraintEnd_toEndOf="parent"
32 - app:layout_constraintStart_toStartOf="parent"
33 - app:layout_constraintTop_toBottomOf="@+id/textView5" />
34 43
35 <TextView 44 <TextView
36 android:id="@+id/textView7" 45 android:id="@+id/textView7"
37 - android:layout_width="315dp" 46 + android:layout_width="351dp"
38 - android:layout_height="61dp" 47 + android:layout_height="58dp"
39 - android:layout_marginTop="60dp" 48 + android:layout_below="@+id/textView6"
49 + android:layout_alignStart="@+id/textView6"
50 + android:layout_alignEnd="@+id/textView6"
51 + android:layout_marginStart="-5dp"
52 + android:layout_marginTop="1dp"
53 + android:layout_marginEnd="-14dp"
40 android:gravity="center" 54 android:gravity="center"
41 android:text="Για σένα που είσαι πολλά χρόνια μαζί μας έχουμε επιπλέον δώρα!" 55 android:text="Για σένα που είσαι πολλά χρόνια μαζί μας έχουμε επιπλέον δώρα!"
42 android:textColor="#858C96" 56 android:textColor="#858C96"
43 android:textSize="15dp" 57 android:textSize="15dp"
44 - app:layout_constraintEnd_toEndOf="parent" 58 + tools:layout_editor_absoluteX="26dp"
45 - app:layout_constraintStart_toStartOf="parent" 59 + tools:layout_editor_absoluteY="177dp" />
46 - app:layout_constraintTop_toBottomOf="@+id/textView6" />
47 60
48 - <androidx.constraintlayout.widget.ConstraintLayout 61 + <LinearLayout
49 - android:layout_width="358dp" 62 + android:id="@+id/constraintLayout"
50 - android:layout_height="61dp" 63 + android:layout_width="364dp"
64 + android:layout_height="56dp"
65 + android:layout_below="@+id/textView7"
66 + android:layout_alignStart="@+id/textView7"
67 + android:layout_alignEnd="@+id/textView7"
68 + android:layout_marginStart="-8dp"
69 + android:layout_marginTop="38dp"
70 + android:layout_marginEnd="-3dp"
51 android:background="@drawable/banner_border_grey_bg" 71 android:background="@drawable/banner_border_grey_bg"
52 - tools:layout_editor_absoluteX="26dp" 72 + android:gravity="center_vertical">
53 - tools:layout_editor_absoluteY="319dp">
54 73
55 <TextView 74 <TextView
56 android:id="@+id/textView8" 75 android:id="@+id/textView8"
...@@ -75,14 +94,20 @@ ...@@ -75,14 +94,20 @@
75 app:layout_constraintHorizontal_bias="0.428" 94 app:layout_constraintHorizontal_bias="0.428"
76 app:layout_constraintStart_toEndOf="@+id/textView8" 95 app:layout_constraintStart_toEndOf="@+id/textView8"
77 app:layout_constraintTop_toTopOf="@+id/textView8" /> 96 app:layout_constraintTop_toTopOf="@+id/textView8" />
78 - </androidx.constraintlayout.widget.ConstraintLayout> 97 + </LinearLayout>
79 98
80 - <androidx.constraintlayout.widget.ConstraintLayout 99 + <LinearLayout
81 - android:layout_width="358dp" 100 + android:id="@+id/constraintLayout3"
82 - android:layout_height="61dp" 101 + android:layout_width="wrap_content"
102 + android:layout_height="60dp"
103 + android:layout_below="@+id/constraintLayout"
104 + android:layout_alignStart="@+id/constraintLayout"
105 + android:layout_alignEnd="@+id/constraintLayout"
106 + android:layout_marginStart="1dp"
107 + android:layout_marginTop="33dp"
108 + android:layout_marginEnd="3dp"
83 android:background="@drawable/banner_border_grey_bg" 109 android:background="@drawable/banner_border_grey_bg"
84 - tools:layout_editor_absoluteX="26dp" 110 + android:gravity="center_vertical"
85 - tools:layout_editor_absoluteY="415dp"
86 android:paddingHorizontal="5dp"> 111 android:paddingHorizontal="5dp">
87 112
88 <TextView 113 <TextView
...@@ -95,25 +120,31 @@ ...@@ -95,25 +120,31 @@
95 app:layout_constraintBottom_toBottomOf="parent" 120 app:layout_constraintBottom_toBottomOf="parent"
96 app:layout_constraintStart_toStartOf="parent" 121 app:layout_constraintStart_toStartOf="parent"
97 app:layout_constraintTop_toTopOf="parent" /> 122 app:layout_constraintTop_toTopOf="parent" />
98 - </androidx.constraintlayout.widget.ConstraintLayout> 123 + </LinearLayout>
99 124
100 - <androidx.constraintlayout.widget.ConstraintLayout 125 + <LinearLayout
101 - android:layout_width="358dp" 126 + android:id="@+id/constraintLayout4"
102 - android:layout_height="61dp" 127 + android:layout_width="wrap_content"
128 + android:layout_height="59dp"
129 + android:layout_below="@+id/constraintLayout3"
130 + android:layout_alignStart="@+id/constraintLayout3"
131 + android:layout_alignEnd="@+id/constraintLayout3"
132 + android:layout_marginStart="2dp"
133 + android:layout_marginTop="29dp"
134 + android:layout_marginEnd="1dp"
103 android:background="@drawable/banner_border_grey_bg" 135 android:background="@drawable/banner_border_grey_bg"
104 - android:paddingHorizontal="5dp" 136 + android:gravity="center_vertical"
105 - tools:layout_editor_absoluteX="26dp" 137 + android:paddingHorizontal="5dp">
106 - tools:layout_editor_absoluteY="518dp">
107 138
108 <TextView 139 <TextView
109 android:id="@+id/tv_ikea_coupon" 140 android:id="@+id/tv_ikea_coupon"
110 android:layout_width="match_parent" 141 android:layout_width="match_parent"
111 android:layout_height="wrap_content" 142 android:layout_height="wrap_content"
112 android:layout_marginStart="16dp" 143 android:layout_marginStart="16dp"
113 - android:text="Δωρεάν κουπόνι ΙΚΕΑ αξίας 10€" 144 + android:text="Day Free COSMOTE TV pass στο κινητό"
114 android:textSize="17dp" 145 android:textSize="17dp"
115 app:layout_constraintBottom_toBottomOf="parent" 146 app:layout_constraintBottom_toBottomOf="parent"
116 app:layout_constraintStart_toStartOf="parent" 147 app:layout_constraintStart_toStartOf="parent"
117 app:layout_constraintTop_toTopOf="parent" /> 148 app:layout_constraintTop_toTopOf="parent" />
118 - </androidx.constraintlayout.widget.ConstraintLayout>
119 -</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
149 + </LinearLayout>
150 +</RelativeLayout>
...\ No newline at end of file ...\ No newline at end of file
......