Panagiotis Triantafyllou

retrofit fixes

...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
100 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_coupons.xml" value="0.358695652173913" /> 100 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_coupons.xml" value="0.358695652173913" />
101 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_gifts.xml" value="0.36666666666666664" /> 101 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_gifts.xml" value="0.36666666666666664" />
102 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_rewards.xml" value="0.358695652173913" /> 102 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_active_rewards.xml" value="0.358695652173913" />
103 - <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_base_fragment.xml" value="0.358695652173913" /> 103 + <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_base_fragment.xml" value="0.25" />
104 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_bill_payment.xml" value="0.358695652173913" /> 104 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_bill_payment.xml" value="0.358695652173913" />
105 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_contextual.xml" value="0.36666666666666664" /> 105 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_contextual.xml" value="0.36666666666666664" />
106 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_coupon_gift.xml" value="0.36666666666666664" /> 106 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_coupon_gift.xml" value="0.36666666666666664" />
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
133 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/dl_share.xml" value="0.36666666666666664" /> 133 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/dl_share.xml" value="0.36666666666666664" />
134 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/dlg_success.xml" value="0.358695652173913" /> 134 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/dlg_success.xml" value="0.358695652173913" />
135 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/expired_coupon_layout.xml" value="0.36666666666666664" /> 135 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/expired_coupon_layout.xml" value="0.36666666666666664" />
136 - <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_home.xml" value="0.358695652173913" /> 136 + <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_home.xml" value="0.22" />
137 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_loyalty.xml" value="0.358695652173913" /> 137 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_loyalty.xml" value="0.358695652173913" />
138 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_profile.xml" value="0.358695652173913" /> 138 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/fragment_profile.xml" value="0.358695652173913" />
139 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/gift_layout.xml" value="0.358695652173913" /> 139 <entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/gift_layout.xml" value="0.358695652173913" />
......
...@@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { ...@@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity {
36 public void onWarplyReady() { 36 public void onWarplyReady() {
37 if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { 37 if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
38 WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() 38 WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
39 - .setGuid("6010139202"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, live 3000184910 39 + .setGuid("6005892749"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910
40 mLoginReceiver); 40 mLoginReceiver);
41 } else { 41 } else {
42 startNextActivity(); 42 startNextActivity();
......
...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4.6rc20' 5 + PUBLISH_VERSION = '4.5.4.6rc21'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
...@@ -42,6 +42,7 @@ android { ...@@ -42,6 +42,7 @@ android {
42 42
43 dependencies { 43 dependencies {
44 //------------------------------ Support -----------------------------// 44 //------------------------------ Support -----------------------------//
45 + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
45 implementation 'androidx.appcompat:appcompat:1.4.1' 46 implementation 'androidx.appcompat:appcompat:1.4.1'
46 implementation 'androidx.recyclerview:recyclerview:1.2.1' 47 implementation 'androidx.recyclerview:recyclerview:1.2.1'
47 implementation 'androidx.cardview:cardview:1.0.0' 48 implementation 'androidx.cardview:cardview:1.0.0'
......
...@@ -7,6 +7,7 @@ import android.os.Looper; ...@@ -7,6 +7,7 @@ import android.os.Looper;
7 import android.view.MenuItem; 7 import android.view.MenuItem;
8 import android.widget.LinearLayout; 8 import android.widget.LinearLayout;
9 import android.widget.TextView; 9 import android.widget.TextView;
10 +import android.widget.Toast;
10 11
11 import androidx.annotation.NonNull; 12 import androidx.annotation.NonNull;
12 import androidx.fragment.app.Fragment; 13 import androidx.fragment.app.Fragment;
...@@ -136,28 +137,27 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation ...@@ -136,28 +137,27 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
136 // Inner and Anonymous Classes 137 // Inner and Anonymous Classes
137 // =========================================================== 138 // ===========================================================
138 139
139 - private CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() { 140 + private final CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() {
140 @Override 141 @Override
141 public void onSuccess(ArrayList<Campaign> result) { 142 public void onSuccess(ArrayList<Campaign> result) {
142 - 143 + Toast.makeText(BaseFragmentActivity.this, "Campaigns Success", Toast.LENGTH_SHORT).show();
143 } 144 }
144 145
145 @Override 146 @Override
146 public void onFailure(int errorCode) { 147 public void onFailure(int errorCode) {
147 - 148 + Toast.makeText(BaseFragmentActivity.this, "Campaigns Error", Toast.LENGTH_SHORT).show();
148 } 149 }
149 }; 150 };
150 151
151 -
152 private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() { 152 private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() {
153 @Override 153 @Override
154 public void onSuccess(CouponList result) { 154 public void onSuccess(CouponList result) {
155 - 155 + Toast.makeText(BaseFragmentActivity.this, "Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show();
156 } 156 }
157 157
158 @Override 158 @Override
159 public void onFailure(int errorCode) { 159 public void onFailure(int errorCode) {
160 - 160 + Toast.makeText(BaseFragmentActivity.this, "Coupons Error", Toast.LENGTH_SHORT).show();
161 } 161 }
162 }; 162 };
163 163
......
...@@ -325,7 +325,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene ...@@ -325,7 +325,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
325 public void onSuccess(JSONObject result) { 325 public void onSuccess(JSONObject result) {
326 int status = result.optInt("status", 2); 326 int status = result.optInt("status", 2);
327 String message = result.optString("msg", ""); 327 String message = result.optString("msg", "");
328 - WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver); 328 + WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
329 runOnUiThread(() -> { 329 runOnUiThread(() -> {
330 if (status == 1) 330 if (status == 1)
331 acceptSharingDialog(); 331 acceptSharingDialog();
......
...@@ -212,7 +212,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe ...@@ -212,7 +212,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
212 showDialog(true, 1); 212 showDialog(true, 1);
213 new Thread(() -> { 213 new Thread(() -> {
214 if (!Thread.currentThread().isInterrupted()) { 214 if (!Thread.currentThread().isInterrupted()) {
215 - WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver); 215 + WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
216 WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback); 216 WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback);
217 } 217 }
218 }).start(); 218 }).start();
......
...@@ -9,20 +9,29 @@ import android.widget.ImageView; ...@@ -9,20 +9,29 @@ import android.widget.ImageView;
9 import android.widget.LinearLayout; 9 import android.widget.LinearLayout;
10 import android.widget.RelativeLayout; 10 import android.widget.RelativeLayout;
11 import android.widget.TextView; 11 import android.widget.TextView;
12 +import android.widget.Toast;
12 13
13 import androidx.annotation.NonNull; 14 import androidx.annotation.NonNull;
14 import androidx.constraintlayout.widget.ConstraintLayout; 15 import androidx.constraintlayout.widget.ConstraintLayout;
15 import androidx.fragment.app.Fragment; 16 import androidx.fragment.app.Fragment;
16 import androidx.recyclerview.widget.LinearLayoutManager; 17 import androidx.recyclerview.widget.LinearLayoutManager;
17 import androidx.recyclerview.widget.RecyclerView; 18 import androidx.recyclerview.widget.RecyclerView;
19 +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
20 +
21 +import java.util.ArrayList;
18 22
19 import ly.warp.sdk.R; 23 import ly.warp.sdk.R;
20 import ly.warp.sdk.activities.ActiveCouponsActivity; 24 import ly.warp.sdk.activities.ActiveCouponsActivity;
21 import ly.warp.sdk.activities.WarpViewActivity; 25 import ly.warp.sdk.activities.WarpViewActivity;
26 +import ly.warp.sdk.io.callbacks.CallbackReceiver;
27 +import ly.warp.sdk.io.models.Campaign;
28 +import ly.warp.sdk.io.models.CouponList;
29 +import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
22 import ly.warp.sdk.utils.WarplyManagerHelper; 30 import ly.warp.sdk.utils.WarplyManagerHelper;
31 +import ly.warp.sdk.utils.managers.WarplyManager;
23 import ly.warp.sdk.views.adapters.HomeCampaignAdapter; 32 import ly.warp.sdk.views.adapters.HomeCampaignAdapter;
24 33
25 -public class HomeFragment extends Fragment implements View.OnClickListener { 34 +public class HomeFragment extends Fragment implements View.OnClickListener, SwipeRefreshLayout.OnRefreshListener {
26 35
27 private RelativeLayout mOptionOne, mOptionTwo, mOptionThree; 36 private RelativeLayout mOptionOne, mOptionTwo, mOptionThree;
28 private RecyclerView mRecyclerCampaigns; 37 private RecyclerView mRecyclerCampaigns;
...@@ -31,6 +40,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -31,6 +40,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
31 private TextView mTvUsername, mTvActiveCoupons; 40 private TextView mTvUsername, mTvActiveCoupons;
32 private ConstraintLayout mClActiveCoupons; 41 private ConstraintLayout mClActiveCoupons;
33 private ImageView mIvStepsActivity; 42 private ImageView mIvStepsActivity;
43 + private SwipeRefreshLayout mSwipeRefresh;
34 44
35 @Override 45 @Override
36 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 46 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
...@@ -40,6 +50,8 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -40,6 +50,8 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
40 public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { 50 public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
41 super.onViewCreated(view, savedInstanceState); 51 super.onViewCreated(view, savedInstanceState);
42 52
53 + mSwipeRefresh = view.findViewById(R.id.sw_refresh);
54 + mSwipeRefresh.setOnRefreshListener(this);
43 mOptionOne = view.findViewById(R.id.info_button); 55 mOptionOne = view.findViewById(R.id.info_button);
44 TextView mOptionOneText = mOptionOne.findViewById(R.id.option_text); 56 TextView mOptionOneText = mOptionOne.findViewById(R.id.option_text);
45 ImageView mOptionOneImage = mOptionOne.findViewById(R.id.option_icon); 57 ImageView mOptionOneImage = mOptionOne.findViewById(R.id.option_icon);
...@@ -93,6 +105,13 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -93,6 +105,13 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
93 } 105 }
94 106
95 @Override 107 @Override
108 + public void onRefresh() {
109 + WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
110 + WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback);
111 + mSwipeRefresh.setRefreshing(false);
112 + }
113 +
114 + @Override
96 public void onClick(View view) { 115 public void onClick(View view) {
97 if (view.getId() == R.id.cl_coupon) { 116 if (view.getId() == R.id.cl_coupon) {
98 Intent intent = new Intent(getContext(), ActiveCouponsActivity.class); 117 Intent intent = new Intent(getContext(), ActiveCouponsActivity.class);
...@@ -105,4 +124,29 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -105,4 +124,29 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
105 HomeFragment homeFragment = new HomeFragment(); 124 HomeFragment homeFragment = new HomeFragment();
106 return homeFragment; 125 return homeFragment;
107 } 126 }
127 +
128 + private final CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() {
129 + @Override
130 + public void onSuccess(ArrayList<Campaign> result) {
131 + Toast.makeText(getActivity(), "Campaigns Success", Toast.LENGTH_SHORT).show();
132 + }
133 +
134 + @Override
135 + public void onFailure(int errorCode) {
136 + Toast.makeText(getActivity(), "Campaigns Error", Toast.LENGTH_SHORT).show();
137 + }
138 + };
139 +
140 +
141 + private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() {
142 + @Override
143 + public void onSuccess(CouponList result) {
144 + Toast.makeText(getActivity(), "Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show();
145 + }
146 +
147 + @Override
148 + public void onFailure(int errorCode) {
149 + Toast.makeText(getActivity(), "Coupons Error", Toast.LENGTH_SHORT).show();
150 + }
151 + };
108 } 152 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -38,7 +38,7 @@ public class EventCampaignCouponService extends Worker { ...@@ -38,7 +38,7 @@ public class EventCampaignCouponService extends Worker {
38 @NonNull 38 @NonNull
39 @Override 39 @Override
40 public Result doWork() { 40 public Result doWork() {
41 - WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver); 41 + WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
42 WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback); 42 WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback);
43 43
44 return Result.success(); 44 return Result.success();
......
...@@ -261,7 +261,7 @@ public class WarplyManagerHelper { ...@@ -261,7 +261,7 @@ public class WarplyManagerHelper {
261 public void onSuccess(JSONObject result) { 261 public void onSuccess(JSONObject result) {
262 int status = result.optInt("status", 2); 262 int status = result.optInt("status", 2);
263 if (status == 1) { 263 if (status == 1) {
264 - WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), new CallbackReceiver<CouponList>() { 264 + WarplyManager.getUserCouponsWithCouponsets(new CallbackReceiver<CouponList>() {
265 @Override 265 @Override
266 public void onSuccess(CouponList result) { 266 public void onSuccess(CouponList result) {
267 WarplyCouponsChangedEventModel couponsChanged = new WarplyCouponsChangedEventModel(); 267 WarplyCouponsChangedEventModel couponsChanged = new WarplyCouponsChangedEventModel();
...@@ -393,7 +393,7 @@ public class WarplyManagerHelper { ...@@ -393,7 +393,7 @@ public class WarplyManagerHelper {
393 public void onSuccess(JSONObject result) { 393 public void onSuccess(JSONObject result) {
394 int status = result.optInt("status", 2); 394 int status = result.optInt("status", 2);
395 if (status == 1) { 395 if (status == 1) {
396 - WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), new CallbackReceiver<CouponList>() { 396 + WarplyManager.getUserCouponsWithCouponsets(new CallbackReceiver<CouponList>() {
397 @Override 397 @Override
398 public void onSuccess(CouponList result) { 398 public void onSuccess(CouponList result) {
399 WarplyCouponsChangedEventModel couponsChanged = new WarplyCouponsChangedEventModel(); 399 WarplyCouponsChangedEventModel couponsChanged = new WarplyCouponsChangedEventModel();
......
...@@ -32,6 +32,7 @@ import android.app.AlarmManager; ...@@ -32,6 +32,7 @@ import android.app.AlarmManager;
32 import android.app.PendingIntent; 32 import android.app.PendingIntent;
33 import android.content.Context; 33 import android.content.Context;
34 import android.content.Intent; 34 import android.content.Intent;
35 +import android.os.AsyncTask;
35 import android.os.Build; 36 import android.os.Build;
36 import android.os.Handler; 37 import android.os.Handler;
37 import android.os.Looper; 38 import android.os.Looper;
...@@ -2593,80 +2594,87 @@ public class WarplyManager { ...@@ -2593,80 +2594,87 @@ public class WarplyManager {
2593 dynatraceEvent.setEventName("custom_success_user_coupons_loyalty"); 2594 dynatraceEvent.setEventName("custom_success_user_coupons_loyalty");
2594 EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); 2595 EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
2595 2596
2596 - CouponList mActiveCouponList = new CouponList(); 2597 + new AsyncTask<Void, CouponList, CouponList>() {
2597 - final ExecutorService executor = Executors.newFixedThreadPool(2); 2598 + @Override
2598 - executor.submit(() -> { 2599 + protected CouponList doInBackground(Void... voids) {
2599 - CouponList mCouponList = new CouponList(); 2600 + CouponList mCouponList = new CouponList();
2600 - for (CouponModel.CouponResult coupon : responseCoupons.body().getResult()) { 2601 + for (CouponModel.CouponResult coupon : responseCoupons.body().getResult()) {
2601 - for (CouponsetModel.MappCoupon couponset : response.body().getContext().getMappCoupon()) { 2602 + for (CouponsetModel.MappCoupon couponset : response.body().getContext().getMappCoupon()) {
2602 - if (coupon.getCouponsetUuid().equals(couponset.getUuid())) { 2603 + if (coupon.getCouponsetUuid().equals(couponset.getUuid())) {
2603 - Coupon newCoupon = new Coupon(); 2604 + Coupon newCoupon = new Coupon();
2604 - newCoupon.setStatus(coupon.getStatus()); 2605 + newCoupon.setStatus(coupon.getStatus());
2605 - 2606 +
2606 - JSONObject obj = new JSONObject(); 2607 + JSONObject obj = new JSONObject();
2608 + try {
2609 + obj.putOpt("assigned", coupon.getChangesDates().getAssigned());
2610 + obj.putOpt("created", coupon.getChangesDates().getCreated());
2611 + newCoupon.setChangesDates(obj);
2612 + } catch (JSONException e) {
2613 + e.printStackTrace();
2614 + }
2615 + newCoupon.setImage(couponset.getImgPreview());
2616 + newCoupon.setMerchantUuid(coupon.getMerchantUuid());
2617 + newCoupon.setCoupon(coupon.getCoupon());
2618 + newCoupon.setCouponsetUuid(coupon.getCouponsetUuid());
2619 + newCoupon.setDiscount(coupon.getDiscount());
2620 + newCoupon.setExpiration(coupon.getExpiration());
2621 + newCoupon.setDescription(couponset.getShortDescription());
2622 + newCoupon.setName(couponset.getName());
2623 + newCoupon.setMerchantUuid(couponset.getMerchantUuid());
2624 + newCoupon.setInnerText(couponset.getInnerText());
2625 + newCoupon.setDiscount_type(couponset.getDiscountType());
2626 + newCoupon.setFinal_price(couponset.getFinalPrice());
2627 + mCouponList.add(newCoupon);
2628 + }
2629 + }
2630 + }
2631 + WarplyManagerHelper.setCouponList(mCouponList);
2632 +
2633 + CouponList mActiveCouponList = new CouponList();
2634 + for (Coupon coupon : mCouponList) {
2635 + if (coupon.getStatus() == 1) {
2636 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
2637 + Date newDate = new Date();
2607 try { 2638 try {
2608 - obj.putOpt("assigned", coupon.getChangesDates().getAssigned()); 2639 + newDate = simpleDateFormat.parse(coupon.getExpiration());
2609 - obj.putOpt("created", coupon.getChangesDates().getCreated()); 2640 + } catch (ParseException e) {
2610 - newCoupon.setChangesDates(obj);
2611 - } catch (JSONException e) {
2612 e.printStackTrace(); 2641 e.printStackTrace();
2613 } 2642 }
2614 - newCoupon.setImage(coupon.getImage()); 2643 + coupon.setExpirationDate(newDate);
2615 - newCoupon.setMerchantUuid(coupon.getMerchantUuid()); 2644 + mActiveCouponList.add(coupon);
2616 - newCoupon.setCoupon(coupon.getCoupon());
2617 - newCoupon.setCouponsetUuid(coupon.getCouponsetUuid());
2618 - newCoupon.setDiscount(coupon.getDiscount());
2619 - newCoupon.setExpiration(coupon.getExpiration());
2620 - newCoupon.setDescription(couponset.getShortDescription());
2621 - newCoupon.setName(couponset.getName());
2622 - newCoupon.setMerchantUuid(couponset.getMerchantUuid());
2623 - newCoupon.setInnerText(couponset.getInnerText());
2624 - newCoupon.setDiscount_type(couponset.getDiscountType());
2625 - newCoupon.setFinal_price(couponset.getFinalPrice());
2626 - mCouponList.add(newCoupon);
2627 } 2645 }
2628 } 2646 }
2629 - } 2647 +
2630 - WarplyManagerHelper.setCouponList(mCouponList); 2648 + Collections.sort(mActiveCouponList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
2631 - 2649 +
2632 - for (Coupon coupon : mCouponList) { 2650 + CouponsetsList newCouponstList = new CouponsetsList();
2633 - if (coupon.getStatus() == 1) { 2651 + for (CouponsetModel.MappCoupon couponsetOld : response.body().getContext().getMappCoupon()) {
2634 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); 2652 + Couponset newCouponset = new Couponset();
2635 - Date newDate = new Date(); 2653 + newCouponset.setUuid(couponsetOld.getUuid());
2636 - try { 2654 + newCouponset.setImg_preview(couponsetOld.getImgPreview());
2637 - newDate = simpleDateFormat.parse(coupon.getExpiration()); 2655 + newCouponset.setExpiration(couponsetOld.getExpiration().getValue());
2638 - } catch (ParseException e) { 2656 + newCouponset.setName(couponsetOld.getName());
2639 - e.printStackTrace(); 2657 + newCouponset.setDescription(couponsetOld.getDescription());
2640 - } 2658 + newCouponset.setShort_description(couponsetOld.getShortDescription());
2641 - coupon.setExpirationDate(newDate); 2659 + newCouponset.setDiscount(couponsetOld.getDiscount());
2642 - mActiveCouponList.add(coupon); 2660 + newCouponset.setTerms(couponsetOld.getTerms());
2661 + newCouponset.setMerchantUuid(couponsetOld.getMerchantUuid());
2662 + newCouponset.setInnerText(couponsetOld.getInnerText());
2663 + newCouponset.setDiscount_type(couponsetOld.getDiscountType());
2664 + newCouponset.setFinal_price(couponsetOld.getFinalPrice());
2665 + newCouponstList.add(newCouponset);
2643 } 2666 }
2644 - } 2667 + WarplyManagerHelper.setCouponsets(newCouponstList);
2645 2668
2646 - Collections.sort(mActiveCouponList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate())); 2669 + return mActiveCouponList;
2647 -
2648 - CouponsetsList newCouponstList = new CouponsetsList();
2649 - for (CouponsetModel.MappCoupon couponsetOld : response.body().getContext().getMappCoupon()) {
2650 - Couponset newCouponset = new Couponset();
2651 - newCouponset.setUuid(couponsetOld.getUuid());
2652 - newCouponset.setImg_preview(couponsetOld.getImgPreview());
2653 - newCouponset.setExpiration(couponsetOld.getExpiration().getValue());
2654 - newCouponset.setName(couponsetOld.getName());
2655 - newCouponset.setDescription(couponsetOld.getDescription());
2656 - newCouponset.setShort_description(couponsetOld.getShortDescription());
2657 - newCouponset.setDiscount(couponsetOld.getDiscount());
2658 - newCouponset.setTerms(couponsetOld.getTerms());
2659 - newCouponset.setMerchantUuid(couponsetOld.getMerchantUuid());
2660 - newCouponset.setInnerText(couponsetOld.getInnerText());
2661 - newCouponset.setDiscount_type(couponsetOld.getDiscountType());
2662 - newCouponset.setFinal_price(couponsetOld.getFinalPrice());
2663 - newCouponstList.add(newCouponset);
2664 } 2670 }
2665 - WarplyManagerHelper.setCouponsets(newCouponstList);
2666 - });
2667 - executor.shutdownNow();
2668 2671
2669 - new Handler(Looper.getMainLooper()).post(() -> receiver.onSuccess(mActiveCouponList)); 2672 + @Override
2673 + protected void onPostExecute(CouponList couponsResponse) {
2674 + super.onPostExecute(couponsResponse);
2675 + receiver.onSuccess(couponsResponse);
2676 + }
2677 + }.execute();
2670 } else { 2678 } else {
2671 LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); 2679 LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
2672 dynatraceEvent.setEventName("custom_error_user_coupons_loyalty"); 2680 dynatraceEvent.setEventName("custom_error_user_coupons_loyalty");
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 2
3 -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 3 +<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
4 xmlns:app="http://schemas.android.com/apk/res-auto" 4 xmlns:app="http://schemas.android.com/apk/res-auto"
5 xmlns:tools="http://schemas.android.com/tools" 5 xmlns:tools="http://schemas.android.com/tools"
6 + android:id="@+id/sw_refresh"
6 android:layout_width="match_parent" 7 android:layout_width="match_parent"
7 - android:layout_height="match_parent" 8 + android:layout_height="match_parent">
8 - android:background="@android:color/white">
9 9
10 - <RelativeLayout 10 + <ScrollView
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="match_parent"> 12 + android:layout_height="match_parent"
13 + android:background="@android:color/white">
13 14
14 - <androidx.constraintlayout.widget.ConstraintLayout 15 + <RelativeLayout
15 - android:id="@+id/rl_header"
16 android:layout_width="match_parent" 16 android:layout_width="match_parent"
17 - android:layout_height="wrap_content" 17 + android:layout_height="match_parent">
18 - android:background="@android:color/white"
19 - android:paddingHorizontal="16dp"
20 - android:paddingTop="16dp">
21 -
22 - <de.hdodenhof.circleimageview.CircleImageView
23 - android:id="@+id/user_img"
24 - android:layout_width="60dp"
25 - android:layout_height="60dp"
26 - android:src="@drawable/profile_photo"
27 - app:layout_constraintStart_toStartOf="parent"
28 - app:layout_constraintTop_toTopOf="parent" />
29 -
30 - <RelativeLayout
31 - android:id="@+id/rl_user_info"
32 - android:layout_width="0dp"
33 - android:layout_height="match_parent"
34 - android:orientation="vertical"
35 - android:paddingLeft="10dp"
36 - app:layout_constraintEnd_toStartOf="@+id/iv_settings"
37 - app:layout_constraintStart_toEndOf="@+id/user_img"
38 - app:layout_constraintTop_toTopOf="@+id/user_img">
39 -
40 - <TextView
41 - android:id="@+id/welcome_user_txt"
42 - android:layout_width="match_parent"
43 - android:layout_height="wrap_content"
44 - android:layout_marginBottom="8dp"
45 - android:maxLines="1"
46 - android:scrollHorizontally="true"
47 - android:textColor="#415564"
48 - tools:text="@string/welcome_user" />
49 -
50 - <ImageView
51 - android:id="@+id/cosmote_one"
52 - android:layout_width="100dp"
53 - android:layout_height="30dp"
54 - android:layout_below="@+id/welcome_user_txt"
55 - android:layout_marginTop="0dp"
56 - android:src="@drawable/cosmote_one" />
57 18
58 - <LinearLayout 19 + <androidx.constraintlayout.widget.ConstraintLayout
59 - android:layout_width="wrap_content" 20 + android:id="@+id/rl_header"
60 - android:layout_height="wrap_content" 21 + android:layout_width="match_parent"
61 - android:layout_below="@+id/cosmote_one"> 22 + android:layout_height="wrap_content"
23 + android:background="@android:color/white"
24 + android:paddingHorizontal="16dp"
25 + android:paddingTop="16dp">
26 +
27 + <de.hdodenhof.circleimageview.CircleImageView
28 + android:id="@+id/user_img"
29 + android:layout_width="60dp"
30 + android:layout_height="60dp"
31 + android:src="@drawable/profile_photo"
32 + app:layout_constraintStart_toStartOf="parent"
33 + app:layout_constraintTop_toTopOf="parent" />
62 34
63 - <include 35 + <RelativeLayout
64 - android:id="@+id/info_button" 36 + android:id="@+id/rl_user_info"
65 - layout="@layout/button_with_image" 37 + android:layout_width="0dp"
66 - android:layout_width="wrap_content" 38 + android:layout_height="match_parent"
67 - android:layout_height="wrap_content" /> 39 + android:orientation="vertical"
40 + android:paddingLeft="10dp"
41 + app:layout_constraintEnd_toStartOf="@+id/iv_settings"
42 + app:layout_constraintStart_toEndOf="@+id/user_img"
43 + app:layout_constraintTop_toTopOf="@+id/user_img">
68 44
69 - <include 45 + <TextView
70 - android:id="@+id/info_button2" 46 + android:id="@+id/welcome_user_txt"
71 - layout="@layout/button_with_image" 47 + android:layout_width="match_parent"
72 - android:layout_width="wrap_content"
73 android:layout_height="wrap_content" 48 android:layout_height="wrap_content"
74 - android:layout_marginLeft="5dp" /> 49 + android:layout_marginBottom="8dp"
50 + android:maxLines="1"
51 + android:scrollHorizontally="true"
52 + android:textColor="#415564"
53 + tools:text="@string/welcome_user" />
54 +
55 + <ImageView
56 + android:id="@+id/cosmote_one"
57 + android:layout_width="100dp"
58 + android:layout_height="30dp"
59 + android:layout_below="@+id/welcome_user_txt"
60 + android:layout_marginTop="0dp"
61 + android:src="@drawable/cosmote_one" />
75 62
76 - <include 63 + <LinearLayout
77 - android:id="@+id/info_button3"
78 - layout="@layout/button_with_image"
79 android:layout_width="wrap_content" 64 android:layout_width="wrap_content"
80 android:layout_height="wrap_content" 65 android:layout_height="wrap_content"
81 - android:layout_marginLeft="5dp" /> 66 + android:layout_below="@+id/cosmote_one">
82 - </LinearLayout> 67 +
83 - </RelativeLayout> 68 + <include
84 - 69 + android:id="@+id/info_button"
85 - <ImageView 70 + layout="@layout/button_with_image"
86 - android:id="@+id/iv_settings" 71 + android:layout_width="wrap_content"
87 - android:layout_width="25dp" 72 + android:layout_height="wrap_content" />
88 - android:layout_height="25dp" 73 +
89 - android:src="@drawable/filters_icon" 74 + <include
90 - app:layout_constraintEnd_toEndOf="parent" 75 + android:id="@+id/info_button2"
91 - app:layout_constraintTop_toTopOf="@+id/user_img" /> 76 + layout="@layout/button_with_image"
92 - </androidx.constraintlayout.widget.ConstraintLayout> 77 + android:layout_width="wrap_content"
78 + android:layout_height="wrap_content"
79 + android:layout_marginLeft="5dp" />
80 +
81 + <include
82 + android:id="@+id/info_button3"
83 + layout="@layout/button_with_image"
84 + android:layout_width="wrap_content"
85 + android:layout_height="wrap_content"
86 + android:layout_marginLeft="5dp" />
87 + </LinearLayout>
88 + </RelativeLayout>
93 89
94 - <RelativeLayout 90 + <ImageView
95 - android:layout_width="wrap_content" 91 + android:id="@+id/iv_settings"
96 - android:layout_height="wrap_content" 92 + android:layout_width="25dp"
97 - android:layout_below="@+id/rl_header" 93 + android:layout_height="25dp"
98 - android:background="@drawable/home_bg"> 94 + android:src="@drawable/filters_icon"
95 + app:layout_constraintEnd_toEndOf="parent"
96 + app:layout_constraintTop_toTopOf="@+id/user_img" />
97 + </androidx.constraintlayout.widget.ConstraintLayout>
99 98
100 <RelativeLayout 99 <RelativeLayout
101 - android:id="@+id/rl_home_campaigns" 100 + android:layout_width="wrap_content"
102 - android:layout_width="match_parent"
103 android:layout_height="wrap_content" 101 android:layout_height="wrap_content"
104 - android:layout_marginTop="50dp"> 102 + android:layout_below="@+id/rl_header"
103 + android:background="@drawable/home_bg">
105 104
106 - <androidx.recyclerview.widget.RecyclerView 105 + <RelativeLayout
107 - android:id="@+id/rv_home_campaigns" 106 + android:id="@+id/rl_home_campaigns"
108 android:layout_width="match_parent" 107 android:layout_width="match_parent"
109 android:layout_height="wrap_content" 108 android:layout_height="wrap_content"
110 - android:layout_marginBottom="8dp" 109 + android:layout_marginTop="50dp">
111 - android:background="#80FFFFFF"
112 - android:clipToPadding="false"
113 - android:orientation="horizontal"
114 - android:paddingVertical="15dp"
115 - android:paddingStart="10dp"
116 - android:paddingEnd="10dp" />
117 - </RelativeLayout>
118 110
119 - <LinearLayout 111 + <androidx.recyclerview.widget.RecyclerView
120 - android:id="@+id/rl_home_coupons" 112 + android:id="@+id/rv_home_campaigns"
121 - android:layout_width="match_parent" 113 + android:layout_width="match_parent"
122 - android:layout_height="wrap_content" 114 + android:layout_height="wrap_content"
123 - android:layout_below="@id/rl_home_campaigns" 115 + android:layout_marginBottom="8dp"
124 - android:visibility="gone"> 116 + android:background="#80FFFFFF"
125 - 117 + android:clipToPadding="false"
126 - <androidx.recyclerview.widget.RecyclerView 118 + android:orientation="horizontal"
127 - android:id="@+id/rv_home_coupons" 119 + android:paddingVertical="15dp"
128 - android:layout_width="match_parent" 120 + android:paddingStart="10dp"
129 - android:layout_height="wrap_content" 121 + android:paddingEnd="10dp" />
130 - android:clipToPadding="false" 122 + </RelativeLayout>
131 - android:orientation="horizontal"
132 - android:paddingStart="10dp"
133 - android:paddingEnd="10dp" />
134 - </LinearLayout>
135 -
136 - <include
137 - android:id="@+id/rl_home_info_widget"
138 - layout="@layout/info_widget"
139 - android:layout_width="match_parent"
140 - android:layout_height="wrap_content"
141 - android:layout_below="@id/rl_home_coupons"
142 - android:layout_marginHorizontal="8dp" />
143 -
144 - <androidx.constraintlayout.widget.ConstraintLayout
145 - android:id="@+id/cl_coupon"
146 - android:layout_width="match_parent"
147 - android:layout_height="140dp"
148 - android:layout_below="@+id/rl_home_info_widget"
149 - android:layout_marginTop="24dp"
150 - android:background="@drawable/ic_coupon_background">
151 123
152 <LinearLayout 124 <LinearLayout
153 - android:layout_width="wrap_content" 125 + android:id="@+id/rl_home_coupons"
126 + android:layout_width="match_parent"
154 android:layout_height="wrap_content" 127 android:layout_height="wrap_content"
155 - android:layout_marginStart="40dp" 128 + android:layout_below="@id/rl_home_campaigns"
156 - android:orientation="vertical" 129 + android:visibility="gone">
157 - app:layout_constraintBottom_toBottomOf="parent"
158 - app:layout_constraintStart_toStartOf="parent"
159 - app:layout_constraintTop_toTopOf="parent">
160 -
161 - <TextView
162 - android:id="@+id/tv_active_coupons"
163 - android:layout_width="wrap_content"
164 - android:layout_height="wrap_content"
165 - android:layout_marginBottom="8dp"
166 - android:textColor="#3A5266"
167 - android:textFontWeight="600"
168 - android:textSize="16sp"
169 - tools:text="@string/cos_active_coupons" />
170 130
171 - <TextView 131 + <androidx.recyclerview.widget.RecyclerView
172 - android:layout_width="wrap_content" 132 + android:id="@+id/rv_home_coupons"
133 + android:layout_width="match_parent"
173 android:layout_height="wrap_content" 134 android:layout_height="wrap_content"
174 - android:layout_marginTop="8dp" 135 + android:clipToPadding="false"
175 - android:text="Δες τα όλα ->" 136 + android:orientation="horizontal"
176 - android:textColor="#3A5266" /> 137 + android:paddingStart="10dp"
138 + android:paddingEnd="10dp" />
177 </LinearLayout> 139 </LinearLayout>
178 140
179 - <ImageView 141 + <include
180 - android:layout_width="90dp" 142 + android:id="@+id/rl_home_info_widget"
181 - android:layout_height="90dp" 143 + layout="@layout/info_widget"
182 - android:layout_marginEnd="32dp" 144 + android:layout_width="match_parent"
183 - android:src="@drawable/ic_gifts_for_you" 145 + android:layout_height="wrap_content"
184 - app:layout_constraintBottom_toBottomOf="parent" 146 + android:layout_below="@id/rl_home_coupons"
185 - app:layout_constraintEnd_toEndOf="parent" 147 + android:layout_marginHorizontal="8dp" />
186 - app:layout_constraintTop_toTopOf="parent" />
187 - </androidx.constraintlayout.widget.ConstraintLayout>
188 -
189 - <TextView
190 - android:id="@+id/hsv_title"
191 - android:layout_width="match_parent"
192 - android:layout_height="40dp"
193 - android:layout_below="@+id/cl_coupon"
194 - android:layout_marginTop="24dp"
195 - android:background="@android:color/white"
196 - android:paddingHorizontal="25dp"
197 - android:paddingTop="10dp"
198 - android:text="Βρες γρήγορα"
199 - android:textColor="#3C464F" />
200 -
201 - <HorizontalScrollView
202 - android:id="@+id/ll_add"
203 - android:layout_width="match_parent"
204 - android:layout_height="110dp"
205 - android:layout_below="@id/hsv_title"
206 - android:background="@android:color/white"
207 - android:paddingBottom="15dp"
208 - android:scrollbars="none">
209 148
210 - <LinearLayout 149 + <androidx.constraintlayout.widget.ConstraintLayout
150 + android:id="@+id/cl_coupon"
211 android:layout_width="match_parent" 151 android:layout_width="match_parent"
212 - android:layout_height="match_parent" 152 + android:layout_height="140dp"
213 - android:divider="@drawable/divider" 153 + android:layout_below="@+id/rl_home_info_widget"
214 - android:showDividers="middle"> 154 + android:layout_marginTop="24dp"
155 + android:background="@drawable/ic_coupon_background">
215 156
216 <LinearLayout 157 <LinearLayout
217 - android:id="@+id/ll_bill_payment" 158 + android:layout_width="wrap_content"
218 - android:layout_width="150dp" 159 + android:layout_height="wrap_content"
219 - android:layout_height="match_parent" 160 + android:layout_marginStart="40dp"
220 - android:gravity="center"
221 android:orientation="vertical" 161 android:orientation="vertical"
222 - android:paddingHorizontal="10dp"> 162 + app:layout_constraintBottom_toBottomOf="parent"
163 + app:layout_constraintStart_toStartOf="parent"
164 + app:layout_constraintTop_toTopOf="parent">
223 165
224 - <ImageView 166 + <TextView
225 - android:layout_width="50dp" 167 + android:id="@+id/tv_active_coupons"
226 - android:layout_height="50dp" 168 + android:layout_width="wrap_content"
227 - android:src="@drawable/doc" /> 169 + android:layout_height="wrap_content"
170 + android:layout_marginBottom="8dp"
171 + android:textColor="#3A5266"
172 + android:textFontWeight="600"
173 + android:textSize="16sp"
174 + tools:text="@string/cos_active_coupons" />
228 175
229 <TextView 176 <TextView
230 - android:layout_width="match_parent" 177 + android:layout_width="wrap_content"
231 - android:layout_height="40dp" 178 + android:layout_height="wrap_content"
232 - android:gravity="center" 179 + android:layout_marginTop="8dp"
233 - android:scrollHorizontally="true" 180 + android:text="Δες τα όλα ->"
234 - android:text="Πληρωμή λογαριασμού" 181 + android:textColor="#3A5266" />
235 - android:textAlignment="center"
236 - android:textColor="#3C464F" />
237 </LinearLayout> 182 </LinearLayout>
238 183
239 - <LinearLayout 184 + <ImageView
240 - android:layout_width="150dp" 185 + android:layout_width="90dp"
241 - android:layout_height="match_parent" 186 + android:layout_height="90dp"
242 - android:gravity="center" 187 + android:layout_marginEnd="32dp"
243 - android:orientation="vertical" 188 + android:src="@drawable/ic_gifts_for_you"
244 - android:paddingHorizontal="10dp"> 189 + app:layout_constraintBottom_toBottomOf="parent"
190 + app:layout_constraintEnd_toEndOf="parent"
191 + app:layout_constraintTop_toTopOf="parent" />
192 + </androidx.constraintlayout.widget.ConstraintLayout>
245 193
246 - <ImageView 194 + <TextView
247 - android:layout_width="50dp" 195 + android:id="@+id/hsv_title"
248 - android:layout_height="50dp" 196 + android:layout_width="match_parent"
249 - android:src="@drawable/message" /> 197 + android:layout_height="40dp"
250 - 198 + android:layout_below="@+id/cl_coupon"
251 - <TextView 199 + android:layout_marginTop="24dp"
252 - android:layout_width="match_parent" 200 + android:background="@android:color/white"
253 - android:layout_height="40dp" 201 + android:paddingHorizontal="25dp"
254 - android:gravity="center" 202 + android:paddingTop="10dp"
255 - android:scrollHorizontally="true" 203 + android:text="Βρες γρήγορα"
256 - android:text="Υποστήριξη" 204 + android:textColor="#3C464F" />
257 - android:textAlignment="center" 205 +
258 - android:textColor="#3C464F" /> 206 + <HorizontalScrollView
259 - </LinearLayout> 207 + android:id="@+id/ll_add"
208 + android:layout_width="match_parent"
209 + android:layout_height="110dp"
210 + android:layout_below="@id/hsv_title"
211 + android:background="@android:color/white"
212 + android:paddingBottom="15dp"
213 + android:scrollbars="none">
260 214
261 <LinearLayout 215 <LinearLayout
262 - android:layout_width="150dp" 216 + android:layout_width="match_parent"
263 android:layout_height="match_parent" 217 android:layout_height="match_parent"
264 - android:gravity="center" 218 + android:divider="@drawable/divider"
265 - android:orientation="vertical" 219 + android:showDividers="middle">
266 - android:paddingHorizontal="10dp">
267 -
268 - <ImageView
269 - android:layout_width="50dp"
270 - android:layout_height="50dp"
271 - android:src="@drawable/doc" />
272 220
273 - <TextView 221 + <LinearLayout
274 - android:layout_width="match_parent" 222 + android:id="@+id/ll_bill_payment"
275 - android:layout_height="40dp" 223 + android:layout_width="150dp"
224 + android:layout_height="match_parent"
225 + android:gravity="center"
226 + android:orientation="vertical"
227 + android:paddingHorizontal="10dp">
228 +
229 + <ImageView
230 + android:layout_width="50dp"
231 + android:layout_height="50dp"
232 + android:src="@drawable/doc" />
233 +
234 + <TextView
235 + android:layout_width="match_parent"
236 + android:layout_height="40dp"
237 + android:gravity="center"
238 + android:scrollHorizontally="true"
239 + android:text="Πληρωμή λογαριασμού"
240 + android:textAlignment="center"
241 + android:textColor="#3C464F" />
242 + </LinearLayout>
243 +
244 + <LinearLayout
245 + android:layout_width="150dp"
246 + android:layout_height="match_parent"
247 + android:gravity="center"
248 + android:orientation="vertical"
249 + android:paddingHorizontal="10dp">
250 +
251 + <ImageView
252 + android:layout_width="50dp"
253 + android:layout_height="50dp"
254 + android:src="@drawable/message" />
255 +
256 + <TextView
257 + android:layout_width="match_parent"
258 + android:layout_height="40dp"
259 + android:gravity="center"
260 + android:scrollHorizontally="true"
261 + android:text="Υποστήριξη"
262 + android:textAlignment="center"
263 + android:textColor="#3C464F" />
264 + </LinearLayout>
265 +
266 + <LinearLayout
267 + android:layout_width="150dp"
268 + android:layout_height="match_parent"
276 android:gravity="center" 269 android:gravity="center"
277 - android:scrollHorizontally="true" 270 + android:orientation="vertical"
278 - android:text="Πληρωμή λογαριασμού" 271 + android:paddingHorizontal="10dp">
279 - android:textAlignment="center" 272 +
280 - android:textColor="#3C464F" /> 273 + <ImageView
274 + android:layout_width="50dp"
275 + android:layout_height="50dp"
276 + android:src="@drawable/doc" />
277 +
278 + <TextView
279 + android:layout_width="match_parent"
280 + android:layout_height="40dp"
281 + android:gravity="center"
282 + android:scrollHorizontally="true"
283 + android:text="Πληρωμή λογαριασμού"
284 + android:textAlignment="center"
285 + android:textColor="#3C464F" />
286 + </LinearLayout>
281 </LinearLayout> 287 </LinearLayout>
282 - </LinearLayout> 288 + </HorizontalScrollView>
283 - </HorizontalScrollView> 289 + </RelativeLayout>
284 </RelativeLayout> 290 </RelativeLayout>
285 - </RelativeLayout> 291 + </ScrollView>
286 -</ScrollView> 292 +</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
......