Showing
9 changed files
with
157 additions
and
83 deletions
... | @@ -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("7000000831"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990 | 39 | + .setGuid("7000000870"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990 |
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-cosbeta95' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta96' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ||
... | @@ -62,9 +62,9 @@ dependencies { | ... | @@ -62,9 +62,9 @@ dependencies { |
62 | implementation 'com.google.firebase:firebase-messaging' | 62 | implementation 'com.google.firebase:firebase-messaging' |
63 | 63 | ||
64 | //------------------------------ GMS -----------------------------// | 64 | //------------------------------ GMS -----------------------------// |
65 | - api 'com.google.android.gms:play-services-base:18.0.1' | 65 | + api 'com.google.android.gms:play-services-base:18.1.0' |
66 | - implementation 'com.google.android.gms:play-services-location:19.0.1' | 66 | + implementation 'com.google.android.gms:play-services-location:21.0.0' |
67 | - implementation 'com.google.android.gms:play-services-maps:18.0.2' | 67 | + implementation 'com.google.android.gms:play-services-maps:18.1.0' |
68 | api 'com.google.maps.android:android-maps-utils:0.5' | 68 | api 'com.google.maps.android:android-maps-utils:0.5' |
69 | 69 | ||
70 | //------------------------------ Work Manager -----------------------------// | 70 | //------------------------------ Work Manager -----------------------------// | ... | ... |
... | @@ -5,6 +5,7 @@ import android.content.Context; | ... | @@ -5,6 +5,7 @@ import android.content.Context; |
5 | import android.content.Intent; | 5 | import android.content.Intent; |
6 | import android.graphics.Bitmap; | 6 | import android.graphics.Bitmap; |
7 | import android.graphics.Color; | 7 | import android.graphics.Color; |
8 | +import android.net.Uri; | ||
8 | import android.os.Build; | 9 | import android.os.Build; |
9 | import android.os.Bundle; | 10 | import android.os.Bundle; |
10 | import android.text.Html; | 11 | import android.text.Html; |
... | @@ -33,6 +34,7 @@ import io.github.inflationx.viewpump.ViewPumpContextWrapper; | ... | @@ -33,6 +34,7 @@ import io.github.inflationx.viewpump.ViewPumpContextWrapper; |
33 | import ly.warp.sdk.R; | 34 | import ly.warp.sdk.R; |
34 | import ly.warp.sdk.io.models.Coupon; | 35 | import ly.warp.sdk.io.models.Coupon; |
35 | import ly.warp.sdk.io.models.Couponset; | 36 | import ly.warp.sdk.io.models.Couponset; |
37 | +import ly.warp.sdk.io.models.Merchant; | ||
36 | import ly.warp.sdk.services.EventCouponsService; | 38 | import ly.warp.sdk.services.EventCouponsService; |
37 | import ly.warp.sdk.utils.WarplyManagerHelper; | 39 | import ly.warp.sdk.utils.WarplyManagerHelper; |
38 | import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; | 40 | import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; |
... | @@ -51,10 +53,11 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -51,10 +53,11 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
51 | private ImageView mIvBack, mIvCouponPhoto, mIvBarcode; | 53 | private ImageView mIvBack, mIvCouponPhoto, mIvBarcode; |
52 | private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate, | 54 | private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate, |
53 | mTvTermsValue, mTvFullBarcode; | 55 | mTvTermsValue, mTvFullBarcode; |
54 | - private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms; | 56 | + private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms, mLlWebsite; |
55 | private Coupon mCoupon; | 57 | private Coupon mCoupon; |
56 | private Couponset mCouponset; | 58 | private Couponset mCouponset; |
57 | private boolean mIsBarcodeShown = false, mIsTermsShown = false, mIsFromWallet = false; | 59 | private boolean mIsBarcodeShown = false, mIsTermsShown = false, mIsFromWallet = false; |
60 | + private Merchant mMerchant; | ||
58 | 61 | ||
59 | // =========================================================== | 62 | // =========================================================== |
60 | // Methods for/from SuperClass/Interfaces | 63 | // Methods for/from SuperClass/Interfaces |
... | @@ -78,6 +81,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -78,6 +81,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
78 | mIvCouponPhoto = findViewById(R.id.imageView6); | 81 | mIvCouponPhoto = findViewById(R.id.imageView6); |
79 | mIvBarcode = findViewById(R.id.iv_barcode); | 82 | mIvBarcode = findViewById(R.id.iv_barcode); |
80 | mLlShops = findViewById(R.id.ll_shops); | 83 | mLlShops = findViewById(R.id.ll_shops); |
84 | + mLlWebsite = findViewById(R.id.ll_website); | ||
81 | mLlBarcodeShown = findViewById(R.id.ll_show_barcode); | 85 | mLlBarcodeShown = findViewById(R.id.ll_show_barcode); |
82 | mLlBarcodeContainer = findViewById(R.id.ll_barcode_container_items); | 86 | mLlBarcodeContainer = findViewById(R.id.ll_barcode_container_items); |
83 | mLlTerms = findViewById(R.id.ll_terms_inner); | 87 | mLlTerms = findViewById(R.id.ll_terms_inner); |
... | @@ -129,9 +133,20 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -129,9 +133,20 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
129 | 133 | ||
130 | Intent intent = new Intent(CouponInfoActivity.this, ShopsActivity.class); | 134 | Intent intent = new Intent(CouponInfoActivity.this, ShopsActivity.class); |
131 | intent.putExtra("couponset", (Serializable) mCouponset); | 135 | intent.putExtra("couponset", (Serializable) mCouponset); |
136 | + intent.putExtra("merchant", (Serializable) mMerchant); | ||
132 | startActivity(intent); | 137 | startActivity(intent); |
133 | return; | 138 | return; |
134 | } | 139 | } |
140 | + if (view.getId() == R.id.ll_website) { | ||
141 | + WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite"); | ||
142 | + | ||
143 | + if (!TextUtils.isEmpty(mMerchant.getWebsite())) { | ||
144 | + Intent intent = new Intent(Intent.ACTION_VIEW); | ||
145 | + intent.setData(Uri.parse(mMerchant.getWebsite())); | ||
146 | + startActivity(intent); | ||
147 | + } | ||
148 | + return; | ||
149 | + } | ||
135 | if (view.getId() == R.id.ll_show_barcode) { | 150 | if (view.getId() == R.id.ll_show_barcode) { |
136 | if (mIsBarcodeShown) { | 151 | if (mIsBarcodeShown) { |
137 | mLlBarcodeContainer.setVisibility(View.GONE); | 152 | mLlBarcodeContainer.setVisibility(View.GONE); |
... | @@ -175,6 +190,10 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -175,6 +190,10 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
175 | // =========================================================== | 190 | // =========================================================== |
176 | 191 | ||
177 | private void initViews() { | 192 | private void initViews() { |
193 | + mLlBarcodeShown.setVisibility(View.GONE); | ||
194 | + mLlBarcodeContainer.setVisibility(View.GONE); | ||
195 | + mIvBarcode.setVisibility(View.GONE); | ||
196 | + | ||
178 | mTvCouponCode.setText(mCoupon.getCoupon()); | 197 | mTvCouponCode.setText(mCoupon.getCoupon()); |
179 | mTvCouponTitle.setText(mCoupon.getName()); | 198 | mTvCouponTitle.setText(mCoupon.getName()); |
180 | // mTvCouponSubtitle.setText(mCoupon.getDescription()); | 199 | // mTvCouponSubtitle.setText(mCoupon.getDescription()); |
... | @@ -189,6 +208,24 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -189,6 +208,24 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
189 | } | 208 | } |
190 | 209 | ||
191 | if (mCouponset != null) { | 210 | if (mCouponset != null) { |
211 | + if (WarplyManagerHelper.getMerchantList() != null && WarplyManagerHelper.getMerchantList().size() > 0) { | ||
212 | + for (Merchant merchant : WarplyManagerHelper.getMerchantList()) { | ||
213 | + if (merchant.getUuid().equals(mCouponset.getMerchantUuid())) { | ||
214 | + mMerchant = merchant; | ||
215 | + break; | ||
216 | + } | ||
217 | + } | ||
218 | + | ||
219 | +// if (mMerchant != null) { | ||
220 | +// if (mMerchant.getExtraFields() != null && mMerchant.getExtraFields().has("show_map") && (mMerchant.getExtraFields().optBoolean("show_map") || mMerchant.getExtraFields().optString("show_map").equals("true"))) { | ||
221 | + mLlShops.setVisibility(View.VISIBLE); | ||
222 | +// } | ||
223 | +// if (mMerchant.getExtraFields() != null && mMerchant.getExtraFields().has("eshop") && (mMerchant.getExtraFields().optBoolean("eshop") || mMerchant.getExtraFields().optString("eshop").equals("true"))) { | ||
224 | +// mLlWebsite.setVisibility(View.VISIBLE); | ||
225 | +// } | ||
226 | +// } | ||
227 | + } | ||
228 | + | ||
192 | mTvCouponSubtitle.setText(mCouponset.getShortDescription()); | 229 | mTvCouponSubtitle.setText(mCouponset.getShortDescription()); |
193 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { | 230 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
194 | mTvTermsValue.setText(Html.fromHtml(mCouponset.getTerms(), Html.FROM_HTML_MODE_COMPACT)); | 231 | mTvTermsValue.setText(Html.fromHtml(mCouponset.getTerms(), Html.FROM_HTML_MODE_COMPACT)); |
... | @@ -225,6 +262,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -225,6 +262,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
225 | // mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); | 262 | // mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); |
226 | mLlGiftIt.setOnClickListener(this); | 263 | mLlGiftIt.setOnClickListener(this); |
227 | mLlShops.setOnClickListener(this); | 264 | mLlShops.setOnClickListener(this); |
265 | + mLlWebsite.setOnClickListener(this); | ||
228 | mLlBarcodeShown.setOnClickListener(this); | 266 | mLlBarcodeShown.setOnClickListener(this); |
229 | mLlTerms.setOnClickListener(this); | 267 | mLlTerms.setOnClickListener(this); |
230 | 268 | ||
... | @@ -268,6 +306,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -268,6 +306,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
268 | 306 | ||
269 | } catch (Exception e) { | 307 | } catch (Exception e) { |
270 | e.printStackTrace(); | 308 | e.printStackTrace(); |
309 | + mLlBarcodeShown.setVisibility(View.GONE); | ||
310 | + mLlBarcodeContainer.setVisibility(View.GONE); | ||
271 | mIvBarcode.setVisibility(View.GONE); | 311 | mIvBarcode.setVisibility(View.GONE); |
272 | } | 312 | } |
273 | } | 313 | } | ... | ... |
... | @@ -16,6 +16,7 @@ import android.widget.LinearLayout; | ... | @@ -16,6 +16,7 @@ import android.widget.LinearLayout; |
16 | import android.widget.TextView; | 16 | import android.widget.TextView; |
17 | 17 | ||
18 | import androidx.annotation.NonNull; | 18 | import androidx.annotation.NonNull; |
19 | +import androidx.appcompat.app.AlertDialog; | ||
19 | import androidx.core.app.ActivityCompat; | 20 | import androidx.core.app.ActivityCompat; |
20 | import androidx.core.content.ContextCompat; | 21 | import androidx.core.content.ContextCompat; |
21 | import androidx.fragment.app.FragmentActivity; | 22 | import androidx.fragment.app.FragmentActivity; |
... | @@ -68,6 +69,8 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -68,6 +69,8 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
68 | private ClusterManager<Merchant> mClusterManager; | 69 | private ClusterManager<Merchant> mClusterManager; |
69 | SupportMapFragment mMapView; | 70 | SupportMapFragment mMapView; |
70 | private MerchantList mMerchantList = new MerchantList(); | 71 | private MerchantList mMerchantList = new MerchantList(); |
72 | + private AlertDialog mAlertDialogNoShopsAvailable; | ||
73 | + private Merchant mMerchant; | ||
71 | 74 | ||
72 | // =========================================================== | 75 | // =========================================================== |
73 | // Methods for/from SuperClass/Interfaces | 76 | // Methods for/from SuperClass/Interfaces |
... | @@ -79,6 +82,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -79,6 +82,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
79 | setContentView(R.layout.activity_shops); | 82 | setContentView(R.layout.activity_shops); |
80 | 83 | ||
81 | mCouponset = (Couponset) getIntent().getSerializableExtra("couponset"); | 84 | mCouponset = (Couponset) getIntent().getSerializableExtra("couponset"); |
85 | + mMerchant = (Merchant) getIntent().getSerializableExtra("merchant"); | ||
82 | 86 | ||
83 | mIvBack = findViewById(R.id.iv_shops_back); | 87 | mIvBack = findViewById(R.id.iv_shops_back); |
84 | mMapView = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mv_shops); | 88 | mMapView = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mv_shops); |
... | @@ -254,11 +258,38 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -254,11 +258,38 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
254 | // Methods | 258 | // Methods |
255 | // =========================================================== | 259 | // =========================================================== |
256 | 260 | ||
261 | + private void showNoShopsAvailableDialog() { | ||
262 | + mAlertDialogNoShopsAvailable = new AlertDialog.Builder(this) | ||
263 | + .setTitle(R.string.cos_dlg_no_shops_title) | ||
264 | + .setMessage(R.string.cos_dlg_no_shops) | ||
265 | + .setPositiveButton(R.string.cos_dlg_no_shops_positive, (dialogPositive, whichPositive) -> { | ||
266 | + dialogPositive.dismiss(); | ||
267 | + openWebsite(); | ||
268 | + | ||
269 | + }) | ||
270 | + .setNegativeButton(R.string.cos_dlg_negative_button2, (dialogNegative, whichNegative) -> { | ||
271 | + dialogNegative.dismiss(); | ||
272 | + onBackPressed(); | ||
273 | + }) | ||
274 | + .show(); | ||
275 | + } | ||
276 | + | ||
277 | + private void openWebsite() { | ||
278 | + WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite"); | ||
279 | + | ||
280 | + if (!TextUtils.isEmpty(mMerchant.getWebsite())) { | ||
281 | + Intent intent = new Intent(Intent.ACTION_VIEW); | ||
282 | + intent.setData(Uri.parse(mMerchant.getWebsite())); | ||
283 | + startActivity(intent); | ||
284 | + } | ||
285 | + } | ||
286 | + | ||
257 | private final CallbackReceiver<MerchantList> mMerchantsCallback = new CallbackReceiver<MerchantList>() { | 287 | private final CallbackReceiver<MerchantList> mMerchantsCallback = new CallbackReceiver<MerchantList>() { |
258 | @Override | 288 | @Override |
259 | public void onSuccess(MerchantList result) { | 289 | public void onSuccess(MerchantList result) { |
260 | mMerchantList.clear(); | 290 | mMerchantList.clear(); |
261 | mMerchantList.addAll(result); | 291 | mMerchantList.addAll(result); |
292 | + | ||
262 | new Handler(Looper.getMainLooper()).post(() -> { | 293 | new Handler(Looper.getMainLooper()).post(() -> { |
263 | // if (mClusterManager != null) { | 294 | // if (mClusterManager != null) { |
264 | // mMap.clear(); | 295 | // mMap.clear(); |
... | @@ -269,6 +300,18 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -269,6 +300,18 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
269 | // mClusterManager.cluster(); | 300 | // mClusterManager.cluster(); |
270 | // } | 301 | // } |
271 | 302 | ||
303 | + int nonNullCoords = 0; | ||
304 | + for (Merchant merchCoords : result) { | ||
305 | + if (merchCoords.getLatitude() != 0.0 && merchCoords.getLongitude() != 0.0) { | ||
306 | + nonNullCoords++; | ||
307 | + } | ||
308 | + } | ||
309 | + | ||
310 | + if (result.size() == 0 || nonNullCoords == 0) { | ||
311 | + showNoShopsAvailableDialog(); | ||
312 | + return; | ||
313 | + } | ||
314 | + | ||
272 | for (Merchant merch : result) { | 315 | for (Merchant merch : result) { |
273 | mMap.addMarker(new MarkerOptions() | 316 | mMap.addMarker(new MarkerOptions() |
274 | .position(new LatLng(merch.getLatitude(), merch.getLongitude())) | 317 | .position(new LatLng(merch.getLatitude(), merch.getLongitude())) | ... | ... |
... | @@ -210,8 +210,8 @@ public class Merchant implements Parcelable, Serializable, ClusterItem { | ... | @@ -210,8 +210,8 @@ public class Merchant implements Parcelable, Serializable, ClusterItem { |
210 | this.description = json.optString(DESCRIPTION); | 210 | this.description = json.optString(DESCRIPTION); |
211 | this.short_description = json.optString(SHORT_DESCRIPTION); | 211 | this.short_description = json.optString(SHORT_DESCRIPTION); |
212 | this.region = json.optString(REGION); | 212 | this.region = json.optString(REGION); |
213 | - this.latitude = json.optDouble(LAT); | 213 | + this.latitude = json.isNull(LAT) ? 0.0 : json.optDouble(LAT); |
214 | - this.longitude = json.optDouble(LON); | 214 | + this.longitude = json.isNull(LON) ? 0.0 : json.optDouble(LON); |
215 | this.image = json.optString(IMAGE); | 215 | this.image = json.optString(IMAGE); |
216 | this.extra_fields = json.optJSONObject(EXTRA_FIELDS); | 216 | this.extra_fields = json.optJSONObject(EXTRA_FIELDS); |
217 | this.active = json.optBoolean(ACTIVE); | 217 | this.active = json.optBoolean(ACTIVE); | ... | ... |
... | @@ -1224,6 +1224,7 @@ public class WarplyManagerHelper { | ... | @@ -1224,6 +1224,7 @@ public class WarplyManagerHelper { |
1224 | } | 1224 | } |
1225 | 1225 | ||
1226 | public static void setMerchantList(MerchantList merchantList) { | 1226 | public static void setMerchantList(MerchantList merchantList) { |
1227 | + mMerchantList.clear(); | ||
1227 | mMerchantList = merchantList; | 1228 | mMerchantList = merchantList; |
1228 | } | 1229 | } |
1229 | 1230 | ... | ... |
... | @@ -19,6 +19,7 @@ import java.text.ParseException; | ... | @@ -19,6 +19,7 @@ import java.text.ParseException; |
19 | import java.text.SimpleDateFormat; | 19 | import java.text.SimpleDateFormat; |
20 | import java.util.ArrayList; | 20 | import java.util.ArrayList; |
21 | import java.util.Date; | 21 | import java.util.Date; |
22 | +import java.util.Locale; | ||
22 | import java.util.concurrent.TimeUnit; | 23 | import java.util.concurrent.TimeUnit; |
23 | 24 | ||
24 | import io.reactivex.Observable; | 25 | import io.reactivex.Observable; |
... | @@ -121,7 +122,7 @@ public class SharedCouponAdapter extends RecyclerView.Adapter<SharedCouponAdapte | ... | @@ -121,7 +122,7 @@ public class SharedCouponAdapter extends RecyclerView.Adapter<SharedCouponAdapte |
121 | 122 | ||
122 | JSONObject extraFields = WarpJSONParser.getJSONFromString(couponItem.getTransactionMetadata()); | 123 | JSONObject extraFields = WarpJSONParser.getJSONFromString(couponItem.getTransactionMetadata()); |
123 | 124 | ||
124 | - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); | 125 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E, MMM dd yyyy HH:mm:ss", Locale.US); |
125 | Date newDate = new Date(); | 126 | Date newDate = new Date(); |
126 | try { | 127 | try { |
127 | newDate = simpleDateFormat.parse(couponItem.getDate()); | 128 | newDate = simpleDateFormat.parse(couponItem.getDate()); | ... | ... |
... | @@ -16,8 +16,8 @@ | ... | @@ -16,8 +16,8 @@ |
16 | android:layout_width="48dp" | 16 | android:layout_width="48dp" |
17 | android:layout_height="48dp" | 17 | android:layout_height="48dp" |
18 | android:layout_marginStart="16dp" | 18 | android:layout_marginStart="16dp" |
19 | - android:src="@drawable/ic_back" | ||
20 | android:scaleType="centerInside" | 19 | android:scaleType="centerInside" |
20 | + android:src="@drawable/ic_back" | ||
21 | app:layout_constraintBottom_toBottomOf="parent" | 21 | app:layout_constraintBottom_toBottomOf="parent" |
22 | app:layout_constraintStart_toStartOf="parent" | 22 | app:layout_constraintStart_toStartOf="parent" |
23 | app:layout_constraintTop_toTopOf="parent" /> | 23 | app:layout_constraintTop_toTopOf="parent" /> |
... | @@ -35,26 +35,23 @@ | ... | @@ -35,26 +35,23 @@ |
35 | app:layout_constraintTop_toTopOf="parent" /> | 35 | app:layout_constraintTop_toTopOf="parent" /> |
36 | </androidx.constraintlayout.widget.ConstraintLayout> | 36 | </androidx.constraintlayout.widget.ConstraintLayout> |
37 | 37 | ||
38 | - <ScrollView | 38 | + <RelativeLayout |
39 | android:layout_width="match_parent" | 39 | android:layout_width="match_parent" |
40 | android:layout_height="match_parent" | 40 | android:layout_height="match_parent" |
41 | - android:layout_below="@+id/cl_loyalty_wallet_header" | 41 | + android:layout_below="@+id/cl_loyalty_wallet_header"> |
42 | - android:overScrollMode="never"> | ||
43 | 42 | ||
44 | - <androidx.constraintlayout.widget.ConstraintLayout | 43 | + <ScrollView |
45 | android:layout_width="match_parent" | 44 | android:layout_width="match_parent" |
46 | android:layout_height="match_parent" | 45 | android:layout_height="match_parent" |
47 | - android:background="@android:color/white"> | 46 | + android:overScrollMode="never"> |
48 | 47 | ||
49 | -<!-- android:background="@drawable/shape_cos_loyalty_white"--> | 48 | + <LinearLayout |
50 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
51 | android:id="@+id/cl_loyalty_info_view_inner" | 49 | android:id="@+id/cl_loyalty_info_view_inner" |
52 | android:layout_width="match_parent" | 50 | android:layout_width="match_parent" |
53 | - android:layout_height="match_parent" | 51 | + android:layout_height="wrap_content" |
54 | - android:paddingBottom="48dp" | 52 | + android:background="@android:color/white" |
55 | - app:layout_constraintEnd_toEndOf="parent" | 53 | + android:orientation="vertical" |
56 | - app:layout_constraintStart_toStartOf="parent" | 54 | + android:paddingBottom="48dp"> |
57 | - app:layout_constraintTop_toTopOf="parent"> | ||
58 | 55 | ||
59 | <ImageView | 56 | <ImageView |
60 | android:id="@+id/imageView6" | 57 | android:id="@+id/imageView6" |
... | @@ -62,20 +59,8 @@ | ... | @@ -62,20 +59,8 @@ |
62 | android:layout_height="253dp" | 59 | android:layout_height="253dp" |
63 | android:layout_marginTop="0.5dp" | 60 | android:layout_marginTop="0.5dp" |
64 | android:scaleType="centerCrop" | 61 | android:scaleType="centerCrop" |
65 | - app:layout_constraintStart_toStartOf="parent" | ||
66 | - app:layout_constraintTop_toTopOf="parent" | ||
67 | tools:src="@drawable/carousel_banner" /> | 62 | tools:src="@drawable/carousel_banner" /> |
68 | 63 | ||
69 | - <LinearLayout | ||
70 | - android:layout_width="match_parent" | ||
71 | - android:layout_height="wrap_content" | ||
72 | - android:background="@drawable/ic_line" | ||
73 | - app:layout_constraintStart_toStartOf="parent" | ||
74 | - app:layout_constraintEnd_toEndOf="parent" | ||
75 | - app:layout_constraintTop_toTopOf="@+id/imageView6"> | ||
76 | - | ||
77 | - </LinearLayout> | ||
78 | - | ||
79 | <TextView | 64 | <TextView |
80 | android:id="@+id/textView13" | 65 | android:id="@+id/textView13" |
81 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 66 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
... | @@ -86,10 +71,6 @@ | ... | @@ -86,10 +71,6 @@ |
86 | android:paddingHorizontal="32dp" | 71 | android:paddingHorizontal="32dp" |
87 | android:textColor="#415564" | 72 | android:textColor="#415564" |
88 | android:textSize="18sp" | 73 | android:textSize="18sp" |
89 | - app:layout_constraintEnd_toEndOf="parent" | ||
90 | - app:layout_constraintHorizontal_bias="0.509" | ||
91 | - app:layout_constraintStart_toStartOf="parent" | ||
92 | - app:layout_constraintTop_toBottomOf="@+id/imageView6" | ||
93 | tools:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" /> | 74 | tools:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" /> |
94 | 75 | ||
95 | <TextView | 76 | <TextView |
... | @@ -102,9 +83,6 @@ | ... | @@ -102,9 +83,6 @@ |
102 | android:paddingHorizontal="32dp" | 83 | android:paddingHorizontal="32dp" |
103 | android:textColor="#415564" | 84 | android:textColor="#415564" |
104 | android:textSize="16sp" | 85 | android:textSize="16sp" |
105 | - app:layout_constraintEnd_toEndOf="parent" | ||
106 | - app:layout_constraintStart_toStartOf="parent" | ||
107 | - app:layout_constraintTop_toBottomOf="@+id/textView13" | ||
108 | tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" /> | 86 | tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" /> |
109 | 87 | ||
110 | <TextView | 88 | <TextView |
... | @@ -112,14 +90,11 @@ | ... | @@ -112,14 +90,11 @@ |
112 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 90 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
113 | android:layout_width="wrap_content" | 91 | android:layout_width="wrap_content" |
114 | android:layout_height="wrap_content" | 92 | android:layout_height="wrap_content" |
93 | + android:layout_gravity="center" | ||
115 | android:layout_marginTop="48dp" | 94 | android:layout_marginTop="48dp" |
116 | android:text="Κωδικός Κουπονιού" | 95 | android:text="Κωδικός Κουπονιού" |
117 | android:textColor="#415564" | 96 | android:textColor="#415564" |
118 | - android:textSize="18sp" | 97 | + android:textSize="18sp" /> |
119 | - app:layout_constraintEnd_toEndOf="parent" | ||
120 | - app:layout_constraintHorizontal_bias="0.498" | ||
121 | - app:layout_constraintStart_toStartOf="parent" | ||
122 | - app:layout_constraintTop_toBottomOf="@+id/textView14" /> | ||
123 | 98 | ||
124 | <TextView | 99 | <TextView |
125 | android:id="@+id/textView16" | 100 | android:id="@+id/textView16" |
... | @@ -132,9 +107,6 @@ | ... | @@ -132,9 +107,6 @@ |
132 | android:gravity="center" | 107 | android:gravity="center" |
133 | android:textColor="@color/grey" | 108 | android:textColor="@color/grey" |
134 | android:textSize="25dp" | 109 | android:textSize="25dp" |
135 | - app:layout_constraintEnd_toEndOf="parent" | ||
136 | - app:layout_constraintStart_toStartOf="parent" | ||
137 | - app:layout_constraintTop_toBottomOf="@+id/textView15" | ||
138 | tools:text="1A2C378" /> | 110 | tools:text="1A2C378" /> |
139 | 111 | ||
140 | <LinearLayout | 112 | <LinearLayout |
... | @@ -143,10 +115,8 @@ | ... | @@ -143,10 +115,8 @@ |
143 | android:layout_height="wrap_content" | 115 | android:layout_height="wrap_content" |
144 | android:layout_marginTop="20dp" | 116 | android:layout_marginTop="20dp" |
145 | android:gravity="center" | 117 | android:gravity="center" |
146 | - android:orientation="vertical" | 118 | + android:visibility="gone" |
147 | - app:layout_constraintEnd_toEndOf="parent" | 119 | + android:orientation="vertical"> |
148 | - app:layout_constraintStart_toStartOf="parent" | ||
149 | - app:layout_constraintTop_toBottomOf="@+id/textView16"> | ||
150 | 120 | ||
151 | <LinearLayout | 121 | <LinearLayout |
152 | android:id="@+id/ll_barcode_container_items" | 122 | android:id="@+id/ll_barcode_container_items" |
... | @@ -161,10 +131,7 @@ | ... | @@ -161,10 +131,7 @@ |
161 | android:id="@+id/view5" | 131 | android:id="@+id/view5" |
162 | android:layout_width="320dp" | 132 | android:layout_width="320dp" |
163 | android:layout_height="0.8dp" | 133 | android:layout_height="0.8dp" |
164 | - android:background="#E6E6E6" | 134 | + android:background="#E6E6E6" /> |
165 | - app:layout_constraintEnd_toEndOf="parent" | ||
166 | - app:layout_constraintStart_toStartOf="parent" | ||
167 | - app:layout_constraintTop_toBottomOf="@+id/textView16" /> | ||
168 | 135 | ||
169 | <ImageView | 136 | <ImageView |
170 | android:id="@+id/iv_barcode" | 137 | android:id="@+id/iv_barcode" |
... | @@ -172,10 +139,6 @@ | ... | @@ -172,10 +139,6 @@ |
172 | android:layout_height="86dp" | 139 | android:layout_height="86dp" |
173 | android:layout_marginTop="16dp" | 140 | android:layout_marginTop="16dp" |
174 | android:scaleType="fitXY" | 141 | android:scaleType="fitXY" |
175 | - app:layout_constraintBottom_toTopOf="@+id/view4" | ||
176 | - app:layout_constraintEnd_toEndOf="parent" | ||
177 | - app:layout_constraintStart_toStartOf="parent" | ||
178 | - app:layout_constraintTop_toBottomOf="@+id/view5" | ||
179 | tools:srcCompat="@tools:sample/avatars" /> | 142 | tools:srcCompat="@tools:sample/avatars" /> |
180 | 143 | ||
181 | <TextView | 144 | <TextView |
... | @@ -193,11 +156,7 @@ | ... | @@ -193,11 +156,7 @@ |
193 | android:layout_width="320dp" | 156 | android:layout_width="320dp" |
194 | android:layout_height="0.8dp" | 157 | android:layout_height="0.8dp" |
195 | android:layout_marginTop="20dp" | 158 | android:layout_marginTop="20dp" |
196 | - android:background="#E6E6E6" | 159 | + android:background="#E6E6E6" /> |
197 | - app:layout_constraintEnd_toEndOf="parent" | ||
198 | - app:layout_constraintHorizontal_bias="0.505" | ||
199 | - app:layout_constraintStart_toStartOf="parent" | ||
200 | - app:layout_constraintTop_toBottomOf="@+id/iv_barcode" /> | ||
201 | </LinearLayout> | 160 | </LinearLayout> |
202 | 161 | ||
203 | <LinearLayout | 162 | <LinearLayout |
... | @@ -206,6 +165,8 @@ | ... | @@ -206,6 +165,8 @@ |
206 | android:layout_height="wrap_content" | 165 | android:layout_height="wrap_content" |
207 | android:layout_marginTop="20dp" | 166 | android:layout_marginTop="20dp" |
208 | android:gravity="center" | 167 | android:gravity="center" |
168 | + android:visibility="gone" | ||
169 | + tools:visibility="visible" | ||
209 | android:orientation="horizontal"> | 170 | android:orientation="horizontal"> |
210 | 171 | ||
211 | <TextView | 172 | <TextView |
... | @@ -231,26 +192,22 @@ | ... | @@ -231,26 +192,22 @@ |
231 | fontPath="fonts/pf_square_sans_pro_regular.ttf" | 192 | fontPath="fonts/pf_square_sans_pro_regular.ttf" |
232 | android:layout_width="wrap_content" | 193 | android:layout_width="wrap_content" |
233 | android:layout_height="wrap_content" | 194 | android:layout_height="wrap_content" |
195 | + android:layout_gravity="center" | ||
234 | android:layout_marginTop="40dp" | 196 | android:layout_marginTop="40dp" |
235 | android:textColor="#415564" | 197 | android:textColor="#415564" |
236 | - app:layout_constraintEnd_toEndOf="parent" | ||
237 | - app:layout_constraintStart_toStartOf="parent" | ||
238 | - app:layout_constraintTop_toBottomOf="@+id/ll_barcode_container" | ||
239 | tools:text="@string/cos_coupon_date" /> | 198 | tools:text="@string/cos_coupon_date" /> |
240 | 199 | ||
241 | <LinearLayout | 200 | <LinearLayout |
242 | android:id="@+id/ll_gift_it" | 201 | android:id="@+id/ll_gift_it" |
243 | android:layout_width="220dp" | 202 | android:layout_width="220dp" |
244 | android:layout_height="wrap_content" | 203 | android:layout_height="wrap_content" |
204 | + android:layout_gravity="center" | ||
245 | android:layout_marginHorizontal="32dp" | 205 | android:layout_marginHorizontal="32dp" |
246 | android:layout_marginTop="64dp" | 206 | android:layout_marginTop="64dp" |
247 | android:background="@drawable/selector_button_green" | 207 | android:background="@drawable/selector_button_green" |
248 | android:gravity="center" | 208 | android:gravity="center" |
249 | android:orientation="horizontal" | 209 | android:orientation="horizontal" |
250 | - android:paddingVertical="8dp" | 210 | + android:paddingVertical="8dp"> |
251 | - app:layout_constraintEnd_toEndOf="parent" | ||
252 | - app:layout_constraintStart_toStartOf="parent" | ||
253 | - app:layout_constraintTop_toBottomOf="@+id/textView17"> | ||
254 | 211 | ||
255 | <TextView | 212 | <TextView |
256 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 213 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
... | @@ -266,15 +223,15 @@ | ... | @@ -266,15 +223,15 @@ |
266 | android:id="@+id/ll_shops" | 223 | android:id="@+id/ll_shops" |
267 | android:layout_width="220dp" | 224 | android:layout_width="220dp" |
268 | android:layout_height="wrap_content" | 225 | android:layout_height="wrap_content" |
226 | + android:layout_gravity="center" | ||
269 | android:layout_marginHorizontal="32dp" | 227 | android:layout_marginHorizontal="32dp" |
270 | android:layout_marginTop="24dp" | 228 | android:layout_marginTop="24dp" |
271 | android:background="@drawable/selector_button_grey" | 229 | android:background="@drawable/selector_button_grey" |
272 | android:gravity="center" | 230 | android:gravity="center" |
273 | android:orientation="horizontal" | 231 | android:orientation="horizontal" |
274 | android:paddingVertical="8dp" | 232 | android:paddingVertical="8dp" |
275 | - app:layout_constraintEnd_toEndOf="parent" | 233 | + android:visibility="gone" |
276 | - app:layout_constraintStart_toStartOf="parent" | 234 | + tools:visibility="visible"> |
277 | - app:layout_constraintTop_toBottomOf="@+id/ll_gift_it"> | ||
278 | 235 | ||
279 | <TextView | 236 | <TextView |
280 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 237 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
... | @@ -286,15 +243,37 @@ | ... | @@ -286,15 +243,37 @@ |
286 | android:textSize="17dp" /> | 243 | android:textSize="17dp" /> |
287 | </LinearLayout> | 244 | </LinearLayout> |
288 | 245 | ||
246 | + <LinearLayout | ||
247 | + android:id="@+id/ll_website" | ||
248 | + android:layout_width="220dp" | ||
249 | + android:layout_height="wrap_content" | ||
250 | + android:layout_gravity="center" | ||
251 | + android:layout_marginHorizontal="32dp" | ||
252 | + android:layout_marginTop="24dp" | ||
253 | + android:background="@drawable/selector_button_grey" | ||
254 | + android:gravity="center" | ||
255 | + android:orientation="horizontal" | ||
256 | + android:paddingVertical="8dp" | ||
257 | + android:visibility="gone" | ||
258 | + tools:visibility="visible"> | ||
259 | + | ||
260 | + <TextView | ||
261 | + fontPath="fonts/pf_square_sans_pro_medium.ttf" | ||
262 | + android:layout_width="wrap_content" | ||
263 | + android:layout_height="wrap_content" | ||
264 | + android:gravity="center" | ||
265 | + android:text="@string/cos_website" | ||
266 | + android:textColor="@color/cos_green6" | ||
267 | + android:textSize="17dp" /> | ||
268 | + </LinearLayout> | ||
269 | + | ||
289 | <RelativeLayout | 270 | <RelativeLayout |
290 | android:id="@+id/rl_terms" | 271 | android:id="@+id/rl_terms" |
291 | android:layout_width="wrap_content" | 272 | android:layout_width="wrap_content" |
292 | android:layout_height="wrap_content" | 273 | android:layout_height="wrap_content" |
274 | + android:layout_gravity="center" | ||
293 | android:layout_marginTop="32dp" | 275 | android:layout_marginTop="32dp" |
294 | - android:gravity="center" | 276 | + android:gravity="center"> |
295 | - app:layout_constraintEnd_toEndOf="parent" | ||
296 | - app:layout_constraintStart_toStartOf="parent" | ||
297 | - app:layout_constraintTop_toBottomOf="@+id/ll_shops"> | ||
298 | 277 | ||
299 | <LinearLayout | 278 | <LinearLayout |
300 | android:id="@+id/ll_terms_inner" | 279 | android:id="@+id/ll_terms_inner" |
... | @@ -332,8 +311,14 @@ | ... | @@ -332,8 +311,14 @@ |
332 | android:textColor="#415564" | 311 | android:textColor="#415564" |
333 | android:visibility="gone" /> | 312 | android:visibility="gone" /> |
334 | </RelativeLayout> | 313 | </RelativeLayout> |
314 | + </LinearLayout> | ||
315 | + </ScrollView> | ||
316 | + | ||
317 | + <LinearLayout | ||
318 | + android:layout_width="match_parent" | ||
319 | + android:layout_height="wrap_content" | ||
320 | + android:background="@drawable/ic_line"> | ||
335 | 321 | ||
336 | - </androidx.constraintlayout.widget.ConstraintLayout> | 322 | + </LinearLayout> |
337 | - </androidx.constraintlayout.widget.ConstraintLayout> | 323 | + </RelativeLayout> |
338 | - </ScrollView> | ||
339 | </RelativeLayout> | 324 | </RelativeLayout> | ... | ... |
... | @@ -93,6 +93,7 @@ | ... | @@ -93,6 +93,7 @@ |
93 | <string name="cos_dlg_negative_button2">Άκυρο</string> | 93 | <string name="cos_dlg_negative_button2">Άκυρο</string> |
94 | <string name="cos_profile_preferences">+Προτιμήσεις</string> | 94 | <string name="cos_profile_preferences">+Προτιμήσεις</string> |
95 | <string name="cos_shops">Δες τα καταστήματα</string> | 95 | <string name="cos_shops">Δες τα καταστήματα</string> |
96 | + <string name="cos_website">Δες το eshop</string> | ||
96 | <string name="cos_coupon_shops_title">Καταστήματα</string> | 97 | <string name="cos_coupon_shops_title">Καταστήματα</string> |
97 | <string name="cos_coupon_gift">Kάνε δώρο</string> | 98 | <string name="cos_coupon_gift">Kάνε δώρο</string> |
98 | <string name="cos_coupon_share_gift_title">Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο.</string> | 99 | <string name="cos_coupon_share_gift_title">Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο.</string> |
... | @@ -144,6 +145,9 @@ | ... | @@ -144,6 +145,9 @@ |
144 | <string name="cos_share_no_assets">Για την αποστολή του δώρου σου χρειάζεται να έχεις κινητό COSMOTE.</string> | 145 | <string name="cos_share_no_assets">Για την αποστολή του δώρου σου χρειάζεται να έχεις κινητό COSMOTE.</string> |
145 | <string name="cos_dlg_coupon_depleted_title">H προσφορά δεν είναι πλέον διαθέσιμη</string> | 146 | <string name="cos_dlg_coupon_depleted_title">H προσφορά δεν είναι πλέον διαθέσιμη</string> |
146 | <string name="cos_dlg_coupon_depleted_message">Μείνε συντονισμένος για νέες προσφορές και κουπόνια.</string> | 147 | <string name="cos_dlg_coupon_depleted_message">Μείνε συντονισμένος για νέες προσφορές και κουπόνια.</string> |
148 | + <string name="cos_dlg_no_shops">Ο συνεργάτης διαθέτει μόνο ηλεκτρονικό κατάστημα για ηλεκτρονικές παραγγελίες.</string> | ||
149 | + <string name="cos_dlg_no_shops_title">Καταστήματα συνεργάτη</string> | ||
150 | + <string name="cos_dlg_no_shops_positive">Δες το eshop</string> | ||
147 | 151 | ||
148 | <string-array name="coupons_array"> | 152 | <string-array name="coupons_array"> |
149 | <item>Κουπόνια</item> | 153 | <item>Κουπόνια</item> | ... | ... |
-
Please register or login to post a comment