Showing
4 changed files
with
238 additions
and
0 deletions
... | @@ -10,6 +10,7 @@ import androidx.fragment.app.FragmentTransaction; | ... | @@ -10,6 +10,7 @@ import androidx.fragment.app.FragmentTransaction; |
10 | import com.google.android.material.bottomnavigation.BottomNavigationView; | 10 | import com.google.android.material.bottomnavigation.BottomNavigationView; |
11 | import com.google.android.material.navigation.NavigationBarView; | 11 | import com.google.android.material.navigation.NavigationBarView; |
12 | 12 | ||
13 | +import ly.warp.sdk.fragments.BillPaymentFragment; | ||
13 | import ly.warp.sdk.fragments.HomeFragment; | 14 | import ly.warp.sdk.fragments.HomeFragment; |
14 | import ly.warp.sdk.fragments.LoyaltyFragment; | 15 | import ly.warp.sdk.fragments.LoyaltyFragment; |
15 | import warp.ly.android_sdk.R; | 16 | import warp.ly.android_sdk.R; |
... | @@ -62,6 +63,13 @@ public class MainActivity extends BaseActivity implements NavigationBarView.OnIt | ... | @@ -62,6 +63,13 @@ public class MainActivity extends BaseActivity implements NavigationBarView.OnIt |
62 | .addToBackStack(null) | 63 | .addToBackStack(null) |
63 | .commit(); | 64 | .commit(); |
64 | return true; | 65 | return true; |
66 | + case R.id.menu_shop: | ||
67 | + mFragmentToSet = BillPaymentFragment.newInstance(); | ||
68 | + getSupportFragmentManager().beginTransaction() | ||
69 | + .replace(R.id.fl_fragment, mFragmentToSet) | ||
70 | + .addToBackStack(null) | ||
71 | + .commit(); | ||
72 | + return true; | ||
65 | } | 73 | } |
66 | return false; | 74 | return false; |
67 | } | 75 | } | ... | ... |
1 | +package ly.warp.sdk.activities; | ||
2 | + | ||
3 | +import android.app.Activity; | ||
4 | +import android.os.Bundle; | ||
5 | +import android.view.View; | ||
6 | +import android.widget.ImageView; | ||
7 | + | ||
8 | +import ly.warp.sdk.R; | ||
9 | + | ||
10 | + | ||
11 | +public class BillPaymentActivity extends Activity implements View.OnClickListener { | ||
12 | + | ||
13 | + // =========================================================== | ||
14 | + // Constants | ||
15 | + // =========================================================== | ||
16 | + | ||
17 | + // =========================================================== | ||
18 | + // Fields | ||
19 | + // =========================================================== | ||
20 | + | ||
21 | + private ImageView mIvBack; | ||
22 | + | ||
23 | + // =========================================================== | ||
24 | + // Methods for/from SuperClass/Interfaces | ||
25 | + // =========================================================== | ||
26 | + | ||
27 | + @Override | ||
28 | + public void onCreate(Bundle savedInstanceState) { | ||
29 | + super.onCreate(savedInstanceState); | ||
30 | + setContentView(R.layout.fragment_bill_payment); | ||
31 | + | ||
32 | + mIvBack = findViewById(R.id.iv_back); | ||
33 | + | ||
34 | + initViews(); | ||
35 | + } | ||
36 | + | ||
37 | + @Override | ||
38 | + public void onResume() { | ||
39 | + super.onResume(); | ||
40 | + } | ||
41 | + | ||
42 | + @Override | ||
43 | + public void onClick(View view) { | ||
44 | + if (view.getId() == R.id.iv_back) { | ||
45 | + finish(); | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + // =========================================================== | ||
50 | + // Methods | ||
51 | + // =========================================================== | ||
52 | + | ||
53 | + private void initViews() { | ||
54 | + mIvBack.setOnClickListener(this); | ||
55 | + } | ||
56 | + | ||
57 | + // =========================================================== | ||
58 | + // Inner and Anonymous Classes | ||
59 | + // =========================================================== | ||
60 | + | ||
61 | +} |
1 | +package ly.warp.sdk.fragments; | ||
2 | + | ||
3 | +import android.content.Intent; | ||
4 | +import android.os.Bundle; | ||
5 | +import android.view.LayoutInflater; | ||
6 | +import android.view.View; | ||
7 | +import android.view.ViewGroup; | ||
8 | + | ||
9 | +import androidx.annotation.NonNull; | ||
10 | +import androidx.fragment.app.Fragment; | ||
11 | + | ||
12 | +import ly.warp.sdk.R; | ||
13 | +import ly.warp.sdk.activities.BillPaymentActivity; | ||
14 | +import ly.warp.sdk.activities.LoyaltyActivity; | ||
15 | + | ||
16 | +public class BillPaymentFragment extends Fragment { | ||
17 | + | ||
18 | + @Override | ||
19 | + public View onCreateView( | ||
20 | + LayoutInflater inflater, ViewGroup container, | ||
21 | + Bundle savedInstanceState | ||
22 | + ) { | ||
23 | + return inflater.inflate(R.layout.fragment_bill_payment, container, false); | ||
24 | + } | ||
25 | + | ||
26 | + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { | ||
27 | + super.onViewCreated(view, savedInstanceState); | ||
28 | + | ||
29 | + } | ||
30 | + | ||
31 | + @Override | ||
32 | + public void onDestroyView() { | ||
33 | + super.onDestroyView(); | ||
34 | + } | ||
35 | + | ||
36 | + public void onClick(View view) { | ||
37 | +// if (view.getId() == R.id.cl_rewards_wallet) { | ||
38 | + Intent intent = new Intent(getContext(), BillPaymentActivity.class); | ||
39 | + getContext().startActivity(intent); | ||
40 | +// } | ||
41 | + } | ||
42 | + | ||
43 | + public static Fragment newInstance() { | ||
44 | + BillPaymentFragment billPaymentFragment = new BillPaymentFragment(); | ||
45 | + return billPaymentFragment; | ||
46 | + } | ||
47 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto" | ||
3 | + xmlns:tools="http://schemas.android.com/tools" | ||
4 | + android:id="@+id/cl_bill_payment" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="match_parent" | ||
7 | + xmlns:android="http://schemas.android.com/apk/res/android"> | ||
8 | + | ||
9 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
10 | + android:id="@+id/constraintLayout" | ||
11 | + android:layout_width="match_parent" | ||
12 | + android:layout_height="80dp" | ||
13 | + app:layout_constraintTop_toTopOf="parent"> | ||
14 | + | ||
15 | + <ImageView | ||
16 | + android:id="@+id/imageView6" | ||
17 | + android:layout_width="21dp" | ||
18 | + android:layout_height="20dp" | ||
19 | + android:layout_marginStart="24dp" | ||
20 | + android:layout_marginTop="4dp" | ||
21 | + android:src="@drawable/ic_close" | ||
22 | + app:layout_constraintStart_toStartOf="parent" | ||
23 | + app:layout_constraintTop_toTopOf="@+id/textView3" /> | ||
24 | + | ||
25 | + <TextView | ||
26 | + android:id="@+id/textView3" | ||
27 | + android:layout_width="206dp" | ||
28 | + android:layout_height="32dp" | ||
29 | + android:gravity="center" | ||
30 | + android:text="Πληρωμή Λογαριασμού" | ||
31 | + app:layout_constraintBottom_toBottomOf="parent" | ||
32 | + app:layout_constraintEnd_toEndOf="parent" | ||
33 | + app:layout_constraintHorizontal_bias="0.348" | ||
34 | + app:layout_constraintStart_toEndOf="@+id/imageView6" | ||
35 | + app:layout_constraintTop_toTopOf="parent" /> | ||
36 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
37 | + | ||
38 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
39 | + android:layout_width="415dp" | ||
40 | + android:layout_height="794dp" | ||
41 | + android:layout_marginTop="4dp" | ||
42 | + android:background="@drawable/shape_cos_profile" | ||
43 | + android:orientation="vertical" | ||
44 | + android:paddingBottom="24dp" | ||
45 | + app:layout_constraintTop_toBottomOf="@+id/constraintLayout" | ||
46 | + tools:layout_editor_absoluteX="0dp"> | ||
47 | + | ||
48 | + <ImageView | ||
49 | + android:id="@+id/imageView4" | ||
50 | + android:layout_width="357dp" | ||
51 | + android:layout_height="191dp" | ||
52 | + android:src="@drawable/payment_icon" | ||
53 | + app:layout_constraintBottom_toBottomOf="parent" | ||
54 | + app:layout_constraintEnd_toEndOf="parent" | ||
55 | + app:layout_constraintStart_toStartOf="parent" | ||
56 | + app:layout_constraintTop_toTopOf="parent" | ||
57 | + app:layout_constraintVertical_bias="0.06" /> | ||
58 | + | ||
59 | + <View | ||
60 | + android:id="@+id/view" | ||
61 | + android:layout_width="351dp" | ||
62 | + android:layout_height="297dp" | ||
63 | + android:background="@color/white" | ||
64 | + app:layout_constraintBottom_toBottomOf="parent" | ||
65 | + app:layout_constraintEnd_toEndOf="parent" | ||
66 | + app:layout_constraintStart_toStartOf="parent" | ||
67 | + app:layout_constraintTop_toBottomOf="@+id/imageView4" | ||
68 | + app:layout_constraintVertical_bias="0.245" /> | ||
69 | + | ||
70 | + <EditText | ||
71 | + android:id="@+id/editTextTextPersonName" | ||
72 | + android:layout_width="wrap_content" | ||
73 | + android:layout_height="wrap_content" | ||
74 | + android:ems="10" | ||
75 | + android:gravity="center_horizontal" | ||
76 | + android:inputType="textPersonName" | ||
77 | + android:text="Name" | ||
78 | + app:layout_constraintBottom_toBottomOf="@+id/view" | ||
79 | + app:layout_constraintEnd_toEndOf="@+id/view" | ||
80 | + app:layout_constraintHorizontal_bias="0.475" | ||
81 | + app:layout_constraintStart_toStartOf="@+id/view" | ||
82 | + app:layout_constraintTop_toTopOf="@+id/view" | ||
83 | + app:layout_constraintVertical_bias="0.15" /> | ||
84 | + | ||
85 | + <EditText | ||
86 | + android:id="@+id/editTextTextPersonName2" | ||
87 | + android:layout_width="wrap_content" | ||
88 | + android:layout_height="wrap_content" | ||
89 | + android:background="@color/white" | ||
90 | + android:ems="10" | ||
91 | + android:inputType="textPersonName" | ||
92 | + android:text="Name" | ||
93 | + app:layout_constraintBottom_toBottomOf="@+id/view" | ||
94 | + app:layout_constraintEnd_toEndOf="@+id/view" | ||
95 | + app:layout_constraintHorizontal_bias="0.475" | ||
96 | + app:layout_constraintStart_toStartOf="@+id/view" | ||
97 | + app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" | ||
98 | + app:layout_constraintVertical_bias="0.408" /> | ||
99 | + | ||
100 | + <Button | ||
101 | + android:id="@+id/button2" | ||
102 | + android:layout_width="wrap_content" | ||
103 | + android:layout_height="wrap_content" | ||
104 | + android:layout_marginBottom="28dp" | ||
105 | + android:text="Πληρωμή" | ||
106 | + app:layout_constraintBottom_toBottomOf="@+id/view" | ||
107 | + app:layout_constraintEnd_toEndOf="@+id/view" | ||
108 | + app:layout_constraintHorizontal_bias="0.498" | ||
109 | + app:layout_constraintStart_toStartOf="@+id/view" | ||
110 | + app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName2" | ||
111 | + app:layout_constraintVertical_bias="0.916" /> | ||
112 | + | ||
113 | + <ImageView | ||
114 | + android:id="@+id/imageView5" | ||
115 | + android:layout_width="341dp" | ||
116 | + android:layout_height="144dp" | ||
117 | + app:layout_constraintEnd_toEndOf="@+id/view" | ||
118 | + app:layout_constraintStart_toStartOf="@+id/view" | ||
119 | + app:srcCompat="@drawable/ellipse" | ||
120 | + tools:layout_editor_absoluteY="314dp" /> | ||
121 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
122 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment