Panagiotis Triantafyllou

new fixes

......@@ -5,13 +5,17 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.google.zxing.BarcodeFormat;
......@@ -41,10 +45,12 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
// ===========================================================
private ImageView mIvBack, mIvCouponPhoto, mIvBarcode;
private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate;
private LinearLayout mLlGiftIt, mLlShops;
private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate,
mTvTermsValue;
private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms;
private Coupon mCoupon;
private Couponset mCouponset;
private boolean mIsBarcodeShown = false, mIsTermsShown = false;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -67,6 +73,10 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
mIvCouponPhoto = findViewById(R.id.imageView6);
mIvBarcode = findViewById(R.id.iv_barcode);
mLlShops = findViewById(R.id.ll_shops);
mLlBarcodeShown = findViewById(R.id.ll_show_barcode);
mLlBarcodeContainer = findViewById(R.id.ll_barcode_container_items);
mLlTerms = findViewById(R.id.ll_terms_inner);
mTvTermsValue = findViewById(R.id.tv_terms_value);
initViews();
}
......@@ -92,6 +102,38 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
Intent intent = new Intent(CouponInfoActivity.this, ShopsActivity.class);
intent.putExtra("couponset", (Serializable) mCouponset);
startActivity(intent);
return;
}
if (view.getId() == R.id.ll_show_barcode) {
if (mIsBarcodeShown) {
mLlBarcodeContainer.setVisibility(View.GONE);
TextView barcodeButtonTitle = mLlBarcodeShown.findViewById(R.id.tv_barcode);
ImageView barcodeButtonArrow = mLlBarcodeShown.findViewById(R.id.iv_barcode_arrow);
barcodeButtonTitle.setText(getString(R.string.cos_show_barcode));
barcodeButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arrow_down_dark));
mIsBarcodeShown = false;
} else {
mLlBarcodeContainer.setVisibility(View.VISIBLE);
TextView barcodeButtonTitle = mLlBarcodeShown.findViewById(R.id.tv_barcode);
ImageView barcodeButtonArrow = mLlBarcodeShown.findViewById(R.id.iv_barcode_arrow);
barcodeButtonTitle.setText(getString(R.string.cos_hide_barcode));
barcodeButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arrow_up_dark));
mIsBarcodeShown = true;
}
return;
}
if (view.getId() == R.id.ll_terms_inner) {
if (mIsTermsShown) {
mTvTermsValue.setVisibility(View.GONE);
ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow);
termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arrow_down_dark));
mIsTermsShown = false;
} else {
mTvTermsValue.setVisibility(View.VISIBLE);
ImageView termsButtonArrow = mLlTerms.findViewById(R.id.iv_terms_arrow);
termsButtonArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arrow_up_dark));
mIsTermsShown = true;
}
}
}
......@@ -118,6 +160,14 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
}
}
if (mCouponset != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
mTvTermsValue.setText(Html.fromHtml(mCouponset.getTerms(), Html.FROM_HTML_MODE_COMPACT));
} else {
mTvTermsValue.setText(Html.fromHtml(mCouponset.getTerms()));
}
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
......@@ -146,6 +196,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
// mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
mLlGiftIt.setOnClickListener(this);
mLlShops.setOnClickListener(this);
mLlBarcodeShown.setOnClickListener(this);
mLlTerms.setOnClickListener(this);
String tempCoupon = mCoupon.getCoupon();
for (int i = 0; i < (12 - mCoupon.getCoupon().length()); i++) {
......
......@@ -67,6 +67,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
mIvBack = findViewById(R.id.iv_shops_back);
mMapView = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mv_shops);
mMapView.getMapAsync(this);
mIvBack.setOnClickListener(this);
}
@Override
......
......@@ -60,6 +60,7 @@ public class Coupon implements Parcelable, Serializable {
private static final String TRANSACTION_UUID = "transaction_uuid";
private static final String CHANGES_DATES = "changes_dates";
private static final String COUPONSET_UUID = "couponset_uuid";
private static final String MERCHANT_UUID = "merchant_uuid";
/* Member variables of the Campaign object */
......@@ -77,6 +78,7 @@ public class Coupon implements Parcelable, Serializable {
private String transactionUuid = "";
private JSONObject changesDates = new JSONObject();
private String couponsetUuid = "";
private String merchantUuid = "";
/**
* Basic constructor used to create an object from a String, representing a
......@@ -110,6 +112,7 @@ public class Coupon implements Parcelable, Serializable {
this.transactionUuid = json.optString(TRANSACTION_UUID);
this.changesDates = json.optJSONObject(CHANGES_DATES);
this.couponsetUuid = json.optString(COUPONSET_UUID);
this.merchantUuid = json.optString(MERCHANT_UUID);
}
}
......@@ -127,6 +130,7 @@ public class Coupon implements Parcelable, Serializable {
this.transactionDate = source.readString();
this.transactionUuid = source.readString();
this.couponsetUuid = source.readString();
this.merchantUuid = source.readString();
}
@Override
......@@ -144,6 +148,7 @@ public class Coupon implements Parcelable, Serializable {
dest.writeString(this.transactionDate);
dest.writeString(this.transactionUuid);
dest.writeString(this.couponsetUuid);
dest.writeString(this.merchantUuid);
}
/**
......@@ -168,6 +173,7 @@ public class Coupon implements Parcelable, Serializable {
jObj.putOpt(TRANSACTION_UUID, this.transactionUuid);
jObj.putOpt(CHANGES_DATES, this.changesDates);
jObj.putOpt(COUPONSET_UUID, this.couponsetUuid);
jObj.putOpt(MERCHANT_UUID, this.merchantUuid);
} catch (JSONException e) {
if (WarpConstants.DEBUG) {
e.printStackTrace();
......@@ -319,6 +325,14 @@ public class Coupon implements Parcelable, Serializable {
this.couponsetUuid = couponsetUuid;
}
public String getMerchantUuid() {
return merchantUuid;
}
public void setMerchantUuid(String merchantUuid) {
this.merchantUuid = merchantUuid;
}
@Override
public int describeContents() {
return 0;
......
......@@ -136,6 +136,50 @@ public class Merchant implements Parcelable, Serializable, ClusterItem {
private JSONObject product = new JSONObject();
private LatLng coordinates;
public Merchant() {
this.address = "";
this.id = "";
this.store_id = "";
this.name = "";
this.logo = "";
this.website = "";
this.email = "";
this.telephone = "";
this.category = "";
this.description = "";
this.short_description = "";
this.region = "";
this.latitude = 0.0;
this.longitude = 0.0;
this.image = "";
this.extra_fields = new JSONObject();
this.active = true;
this.city = "";
this.country = "";
this.postal_code = "";
this.vat = "";
this.uuid = "";
this.category_uuid = "";
this.created = "";
this.parent = "";
this.img = new JSONArray();
this.img_preview = "";
this.admin_name = "";
this.sorting = 0;
this.body = "";
this.owner_name = "";
this.preview = "";
this.merchant_metadata = new JSONObject();
this.promoted = false;
this.distance = 0;
this.default_shown = true;
this.hidden = false;
this.working_hours = new JSONObject();
this.tags = new JSONArray();
this.product = new JSONObject();
coordinates = new LatLng(this.latitude, this.longitude);
}
/**
* Basic constructor used to create an object from a String, representing a
* JSON Object
......
......@@ -61,6 +61,7 @@ import ly.warp.sdk.io.models.CustomerStateModel;
import ly.warp.sdk.io.models.LoyaltyBadgeModel;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage;
import ly.warp.sdk.io.models.MerchantList;
import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest;
import ly.warp.sdk.io.request.CosmoteSharingRequest;
import ly.warp.sdk.io.request.WarplyIntegrationRequest;
......@@ -96,6 +97,7 @@ public class WarplyManagerHelper {
mAlertDialogReturnSharing, mAlertDialogErrorSharing;
private static LoyaltyBadgeModel mLoyaltyBadge = new LoyaltyBadgeModel();
private static float mDealsSum = 0.0f;
private static MerchantList mMerchantList = new MerchantList();
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -908,6 +910,14 @@ public class WarplyManagerHelper {
mCouponsetsList = couponsets;
}
public static void setMerchantList(MerchantList merchantList) {
mMerchantList = merchantList;
}
public static MerchantList getMerchantList() {
return mMerchantList;
}
public static float getDealsCouponsSum() {
return mDealsSum;
}
......
......@@ -25,6 +25,10 @@
package ly.warp.sdk.utils.managers;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -2163,65 +2167,80 @@ public class WarplyManager {
WarpUtils.log("[WARP Trace] WARPLY User Coupons Request is active");
WarpUtils.log("**************************************************");
getCouponsets(new WarplyGetCouponsetsRequest()
.setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() {
@Override
public void onSuccess(CouponsetsList result) {
Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new CouponsHook(new CallbackReceiver<CouponList>() {
WarplyManager.getMerchantsMultilingual(new WarplyMerchantsRequest()
.setIsMultilingual(true)
, new CallbackReceiver<MerchantList>() {
@Override
public void onSuccess(CouponList response) {
CouponList mCouponList = new CouponList();
for (Coupon coupon : response) {
for (Couponset couponset : result) {
if (coupon.getCouponsetUuid().equals(couponset.getUuid())) {
coupon.setDescription(couponset.getShortDescription());
coupon.setImage(couponset.getImgPreview());
coupon.setName(couponset.getName());
mCouponList.add(coupon);
}
}
}
WarplyManagerHelper.setCouponList(mCouponList);
public void onSuccess(MerchantList result) {
WarplyManagerHelper.setMerchantList(result);
CouponList mActiveCouponList = new CouponList();
for (Coupon coupon : mCouponList) {
if (coupon.getStatus() == 1)
mActiveCouponList.add(coupon);
}
getCouponsets(new WarplyGetCouponsetsRequest()
.setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() {
@Override
public void onSuccess(CouponsetsList result) {
Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new CouponsHook(new CallbackReceiver<CouponList>() {
@Override
public void onSuccess(CouponList response) {
CouponList mCouponList = new CouponList();
for (Coupon coupon : response) {
for (Couponset couponset : result) {
if (coupon.getCouponsetUuid().equals(couponset.getUuid())) {
coupon.setDescription(couponset.getShortDescription());
coupon.setImage(couponset.getImgPreview());
coupon.setName(couponset.getName());
coupon.setMerchantUuid(couponset.getMerchantUuid());
mCouponList.add(coupon);
}
}
}
WarplyManagerHelper.setCouponList(mCouponList);
CouponList mActiveCouponList = new CouponList();
for (Coupon coupon : mCouponList) {
if (coupon.getStatus() == 1)
mActiveCouponList.add(coupon);
}
receiver.onSuccess(mActiveCouponList);
}
@Override
public void onFailure(int errorCode) {
if (errorCode == 401) {
refreshToken(new WarplyRefreshTokenRequest(), new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
int status = result.optInt("status", 2);
if (status == 1)
getUserCoupons(request, receiver);
else
receiver.onFailure(status);
}
@Override
public void onFailure(int errorCode) {
receiver.onFailure(errorCode);
}
});
} else
receiver.onFailure(errorCode);
}
},
request.getSignature()));
}
receiver.onSuccess(mActiveCouponList);
@Override
public void onFailure(int errorCode) {
receiver.onFailure(errorCode);
}
});
}
@Override
public void onFailure(int errorCode) {
if (errorCode == 401) {
refreshToken(new WarplyRefreshTokenRequest(), new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
int status = result.optInt("status", 2);
if (status == 1)
getUserCoupons(request, receiver);
else
receiver.onFailure(status);
}
@Override
public void onFailure(int errorCode) {
receiver.onFailure(errorCode);
}
});
} else
receiver.onFailure(errorCode);
}
},
request.getSignature()));
}
@Override
public void onFailure(int errorCode) {
receiver.onFailure(errorCode);
}
});
});
}
public static void getCosmoteUser(WarplyCosmoteUserRequest request, final CallbackReceiver<JSONObject> receiver) {
......
......@@ -24,6 +24,8 @@ import io.reactivex.subjects.PublishSubject;
import ly.warp.sdk.R;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.Merchant;
import ly.warp.sdk.utils.WarplyManagerHelper;
public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapter.ActiveCouponViewHolder> {
......@@ -92,30 +94,61 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
@Override
public void onBindViewHolder(final ActiveCouponViewHolder holder, int position) {
Coupon couponItem = mCoupons.get(position);
Merchant merchant = new Merchant();
if (mIsPast)
holder.ivCouponBackground.setColorFilter(ContextCompat.getColor(mContext, R.color.grey_light3), android.graphics.PorterDuff.Mode.MULTIPLY);
if (couponItem != null) {
if (!TextUtils.isEmpty(couponItem.getImage())) {
Glide.with(mContext)
if (WarplyManagerHelper.getMerchantList() != null && WarplyManagerHelper.getMerchantList().size() > 0) {
for (Merchant mer : WarplyManagerHelper.getMerchantList()) {
if (mer.getUuid().equals(couponItem.getMerchantUuid())) {
merchant = mer;
break;
}
}
}
if (merchant == null) {
if (!TextUtils.isEmpty(couponItem.getImage())) {
Glide.with(mContext)
// .setDefaultRequestOptions(
// RequestOptions
// .placeholderOf(R.drawable.ic_default_contact_photo)
// .error(R.drawable.ic_default_contact_photo))
.load(couponItem.getImage())
.diskCacheStrategy(DiskCacheStrategy.DATA)
.into(holder.ivCouponLogo);
.load(couponItem.getImage())
.diskCacheStrategy(DiskCacheStrategy.DATA)
.into(holder.ivCouponLogo);
} else {
Glide.with(mContext)
.load(R.drawable.ic_cosmote_logo_horizontal_grey)
.into(holder.ivCouponLogo);
}
holder.tvCouponTitle.setText(couponItem.getName());
if (!mIsPast)
holder.tvCouponDescription.setText(couponItem.getDescription());
} else {
Glide.with(mContext)
.load(R.drawable.ic_cosmote_logo_horizontal_grey)
.into(holder.ivCouponLogo);
if (!TextUtils.isEmpty(merchant.getImage())) {
Glide.with(mContext)
// .setDefaultRequestOptions(
// RequestOptions
// .placeholderOf(R.drawable.ic_default_contact_photo)
// .error(R.drawable.ic_default_contact_photo))
.load(merchant.getImage())
.diskCacheStrategy(DiskCacheStrategy.DATA)
.into(holder.ivCouponLogo);
} else {
Glide.with(mContext)
.load(R.drawable.ic_cosmote_logo_horizontal_grey)
.into(holder.ivCouponLogo);
}
holder.tvCouponTitle.setText(merchant.getAdminName());
if (!mIsPast)
holder.tvCouponDescription.setText(merchant.getShortDescription());
}
holder.tvCouponTitle.setText(couponItem.getName());
if (!mIsPast)
holder.tvCouponDescription.setText(couponItem.getDescription());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
......
......@@ -22,12 +22,12 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cos_coupon_info_title"
android:textColor="@color/grey"
android:textSize="17sp"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -67,6 +67,7 @@
<TextView
android:id="@+id/textView13"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
......@@ -74,7 +75,6 @@
android:paddingHorizontal="32dp"
android:textColor="#415564"
android:textSize="18sp"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.509"
app:layout_constraintStart_toStartOf="parent"
......@@ -83,6 +83,7 @@
<TextView
android:id="@+id/textView14"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
......@@ -90,7 +91,6 @@
android:paddingHorizontal="32dp"
android:textColor="#415564"
android:textSize="16sp"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView13"
......@@ -98,13 +98,13 @@
<TextView
android:id="@+id/textView15"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:text="Κωδικός Κουπονιού"
android:textColor="#415564"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:textSize="16sp"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
......@@ -112,6 +112,7 @@
<TextView
android:id="@+id/textView16"
fontPath="fonts/pf_square_sans_pro_bold.ttf"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="32dp"
......@@ -120,43 +121,101 @@
android:gravity="center"
android:textColor="@color/grey"
android:textSize="25dp"
fontPath="fonts/pf_square_sans_pro_bold.ttf"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView15"
tools:text="1A2C378" />
<View
android:id="@+id/view4"
android:layout_width="320dp"
android:layout_height="0.8dp"
<LinearLayout
android:id="@+id/ll_barcode_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="#E6E6E6"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_barcode" />
app:layout_constraintTop_toBottomOf="@+id/textView16">
<View
android:id="@+id/view5"
android:layout_width="320dp"
android:layout_height="0.8dp"
android:layout_marginTop="16dp"
android:background="#E6E6E6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView16" />
<LinearLayout
android:id="@+id/ll_barcode_container_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<View
android:id="@+id/view5"
android:layout_width="320dp"
android:layout_height="0.8dp"
android:background="#E6E6E6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView16" />
<ImageView
android:id="@+id/iv_barcode"
android:layout_width="284dp"
android:layout_height="86dp"
android:layout_marginTop="16dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toTopOf="@+id/view4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view5"
tools:srcCompat="@tools:sample/avatars" />
<View
android:id="@+id/view4"
android:layout_width="320dp"
android:layout_height="0.8dp"
android:layout_marginTop="20dp"
android:background="#E6E6E6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_barcode" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_show_barcode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_barcode"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cos_show_barcode"
android:textColor="@color/grey"
android:textSize="16sp" />
<ImageView
android:id="@+id/iv_barcode_arrow"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginStart="6dp"
android:src="@drawable/ic_down_dark" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/textView17"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:textColor="#415564"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view4"
app:layout_constraintTop_toBottomOf="@+id/ll_barcode_container"
tools:text="@string/cos_coupon_date" />
<LinearLayout
......@@ -174,12 +233,12 @@
app:layout_constraintTop_toBottomOf="@+id/textView17">
<TextView
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/cos_gift_it"
android:textColor="@color/white"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:textSize="17dp" />
</LinearLayout>
......@@ -198,12 +257,12 @@
app:layout_constraintTop_toBottomOf="@+id/ll_gift_it">
<TextView
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/cos_shops"
android:textColor="@color/cos_green6"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:textSize="17dp" />
</LinearLayout>
......@@ -227,34 +286,32 @@
<TextView
android:id="@+id/tv_terms"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Όροι χρήσης"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:textColor="@color/grey"
android:textSize="15sp" />
android:textSize="16sp" />
<ImageView
android:id="@+id/iv_terms_arrow"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginStart="6dp"
android:layout_marginTop="2dp"
android:src="@drawable/ic_down_dark" />
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/iv_barcode"
android:layout_width="284dp"
android:layout_height="86dp"
android:layout_marginTop="16dp"
android:scaleType="fitXY"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view5"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/tv_terms_value"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_terms_inner"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="16dp"
android:textColor="#415564"
android:visibility="gone" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -121,6 +121,8 @@
<string name="cos_wallet_text4">&#160;σε προσφορές από&#160;</string>
<string name="cos_wallet_text5">&#160;κουπόνια!</string>
<string name="cos_value2">%1$s</string>
<string name="cos_show_barcode">Εμφάνιση barcode</string>
<string name="cos_hide_barcode">Απόκρυψη barcode</string>
<string-array name="coupons_array">
<item>Κουπόνια</item>
......