Panagiotis Triantafyllou

redesign my rewards fragment

......@@ -114,11 +114,11 @@
android:screenOrientation="portrait"
android:theme="@style/SDKAppTheme" />
<activity
android:name="ly.warp.sdk.activities.LoyaltyWallet"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/SDKAppTheme" />
<!-- <activity-->
<!-- android:name="ly.warp.sdk.activities.LoyaltyWallet"-->
<!-- android:exported="false"-->
<!-- android:screenOrientation="portrait"-->
<!-- android:theme="@style/SDKAppTheme" />-->
<activity
android:name="ly.warp.sdk.activities.ActiveGiftsActivity"
......
......@@ -199,25 +199,7 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
mFavValue += WarplyManagerHelper.getDealsCouponsSum();
/** First Banner */
/** Second Banner */
if (WarplyManagerHelper.getLoyaltyBadge() != null && (WarplyManagerHelper.getLoyaltyBadge().getCouponCount() > 0 || WarplyManagerHelper.getLoyaltyBadge().getCouponCount() == 0)) {
String badgeValue = String.format(Locale.GERMAN,"%.02f", WarplyManagerHelper.getLoyaltyBadge().getValue());
mTvGiftsValue.setText(String.format(getString(R.string.cos_value), badgeValue));
if (String.valueOf(WarplyManagerHelper.getLoyaltyBadge().getValue()).length() >= 3) {
mTvGiftsValue.setTextSize(12);
} else {
mTvGiftsValue.setTextSize(14);
}
SpannableStringBuilder sBuilderSecond = new SpannableStringBuilder();
sBuilderSecond.append(String.format(getString(R.string.cos_deals_win_title), badgeValue));
CalligraphyTypefaceSpan typefaceBoldSpanSecond = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
sBuilderSecond.setSpan(typefaceBoldSpanSecond, 24, 24 + badgeValue.length() + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTvGiftsValueAll.setText(sBuilderSecond, TextView.BufferType.SPANNABLE);
mFavValue += WarplyManagerHelper.getLoyaltyBadge().getValue();
}
/** Second Banner */
/** Third Expandable Banner */
/** Second Expandable Banner */
if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) {
countValue = 0.0f;
......@@ -226,7 +208,7 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
for (Couponset couset : WarplyManagerHelper.getCouponsetsDeals()) {
for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
if (cou.getCouponsetUuid().equals(couset.getUuid())) {
countValue += Float.valueOf(cou.getDiscount());
countValue += Float.parseFloat(cou.getDiscount());
cou.setDescription(couset.getShortDescription());
cou.setImage(couset.getImgPreview());
cou.setName(couset.getName());
......@@ -263,7 +245,25 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
sBuilderThird.setSpan(typefaceBoldSpanThird, 24, 24 + badgeValue.length() + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTvMarketAll.setText(sBuilderThird, TextView.BufferType.SPANNABLE);
}
/** Third Expandable Banner */
/** Second Expandable Banner */
/** Third Banner */
if (WarplyManagerHelper.getLoyaltyBadge() != null && (WarplyManagerHelper.getLoyaltyBadge().getCouponCount() > 0 || WarplyManagerHelper.getLoyaltyBadge().getCouponCount() == 0)) {
String badgeValue = String.format(Locale.GERMAN,"%.02f", WarplyManagerHelper.getLoyaltyBadge().getValue());
mTvGiftsValue.setText(String.format(getString(R.string.cos_value), badgeValue));
if (String.valueOf(WarplyManagerHelper.getLoyaltyBadge().getValue()).length() >= 3) {
mTvGiftsValue.setTextSize(12);
} else {
mTvGiftsValue.setTextSize(14);
}
SpannableStringBuilder sBuilderSecond = new SpannableStringBuilder();
sBuilderSecond.append(String.format(getString(R.string.cos_deals_win_title), badgeValue));
CalligraphyTypefaceSpan typefaceBoldSpanSecond = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
sBuilderSecond.setSpan(typefaceBoldSpanSecond, 24, 24 + badgeValue.length() + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTvGiftsValueAll.setText(sBuilderSecond, TextView.BufferType.SPANNABLE);
mFavValue += WarplyManagerHelper.getLoyaltyBadge().getValue();
}
/** Third Banner */
/** Sum Banner */
String allValue = String.format(Locale.GERMAN,"%.02f", mFavValue);
......
......@@ -18,7 +18,6 @@ import org.json.JSONObject;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.GiftsForYouActivity;
import ly.warp.sdk.activities.LoyaltyWallet;
import ly.warp.sdk.activities.MoreForYouActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.io.models.Campaign;
......@@ -172,8 +171,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
@Override
public void onClick(View view) {
if (view.getId() == R.id.cl_rewards_wallet) {
Intent intent = new Intent(getContext(), LoyaltyWallet.class);
startActivity(intent);
return;
}
if (view.getId() == R.id.iv_more2) {
......
......@@ -2,7 +2,6 @@ package ly.warp.sdk.fragments;
import static android.app.Activity.RESULT_OK;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
......@@ -11,34 +10,19 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import net.cachapa.expandablelayout.ExpandableLayout;
import org.apmem.tools.layouts.FlowLayout;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.ActiveCouponsActivity;
import ly.warp.sdk.activities.ActiveUnifiedCouponsActivity;
......@@ -47,16 +31,15 @@ import ly.warp.sdk.activities.LoyaltyHistoryActivity;
import ly.warp.sdk.activities.LoyaltyMarketAnalysisActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.io.models.ActiveDFYCouponEventModel;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.Couponset;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.UnifiedCoupon;
import ly.warp.sdk.io.models.VouchersActivityEventModel;
import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
import ly.warp.sdk.utils.managers.WarplyEventBusManager;
import ly.warp.sdk.views.adapters.ActiveCouponAdapter;
import ly.warp.sdk.views.adapters.MarketCouponAdapter;
public class MyRewardsFragment extends Fragment implements View.OnClickListener {
......@@ -69,37 +52,24 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
// Fields
// ===========================================================
private ImageView mIvDealsLogo, mIvProfilePhoto, mIvExpArrow;
private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll,
mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate,
mTvActiveTitle, mTvActiveCouponsHeader, mTvMarketValue, mTvMarketAll, mTvFavValue,
mTvFavValueAll, mTvDealsCountBadge, mTvUnifiedCountBadge, mTvGiftsCountBadge,
private TextView mTvUserBadge,
mTvDealsCountBadge, mTvUnifiedCountBadge, mTvGiftsCountBadge,
mTvVouchersDisabledTitle, mTvVouchersDisabledSubtitle, mTvVouchersTitle, mTvVouchersSubtitle;
private ConstraintLayout mClDealsBanner, mClDealsView,
mClGiftsBanner, mClMarket;
private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts,
mLlMarketView, mLlHistory, mLlBannerInfo, mLlVouchers, mLlVouchersSpinner,
private ConstraintLayout mLlHistory,
mLlQuestionnaire, mLlUserBadge;
private LinearLayout mLlEmptyWallet,
mLlBannerInfo, mLlVouchers, mLlVouchersSpinner,
mLlVouchersDisabled;
private FlowLayout mLlActiveCodesView;
private float couponDfyValue = 0.0f, mFavValue = 0.0f;
private RecyclerView mRecyclerCoupons, mRvMarketCoupons;
private ActiveCouponAdapter mAdapterCoupons;
private AlertDialog mAlertDialogNonTelco, mAlertDialogVouchersService;
private ScrollView mScActiveCodes;
private int mTimer = 0;
private Handler mSecondsHandler;
private ArrayList<UnifiedCoupon> mUnifiedCoupons = new ArrayList<UnifiedCoupon>();
private float countValue = 0.0f;
private MarketCouponAdapter mAdapterMarketCoupons;
private ExpandableLayout mElGifts;
private boolean mIsStayCollapsed = true;
private CardView mClExp, mCvVouchers, mCvVouchersDisabled;
private CardView mCvVouchers, mCvVouchersDisabled;
private boolean mDfyPressed = false, mDealsBannerPressed = false, mQuestionnairePressed = false,
mHistoryPressed = false, mHistoryMarketPressed = false, mUnifiedPressed = false,
mCouponPressed = false, mHistoryBadgePressed = false, mUnifiedCountPressed = false,
mHistoryPressed = false, mHistoryMarketPressed = false,
mHistoryBadgePressed = false, mUnifiedCountPressed = false,
mGiftsCountPressed = false;
private RelativeLayout mRlDeals, mRlUnified, mRlGifts;
private View mSeparator, mSeparatorDisabled;
private boolean mIsDealsEmpty = false, mIsMarketsEmpty = false, mIsCouponsEmpty = false;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -120,40 +90,10 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mSecondsHandler = new Handler();
mTvUsername = view.findViewById(R.id.tv_profile_name);
mLlQuestionnaire = view.findViewById(R.id.ll_user_questionnaire);
mLlUserBadge = view.findViewById(R.id.ll_user_badge);
mTvUserBadge = view.findViewById(R.id.tv_type);
mTvGiftsValue = view.findViewById(R.id.tv_gifts_value);
mTvGiftsValueAll = view.findViewById(R.id.tv_gifts_value_all);
mClDealsBanner = view.findViewById(R.id.cl_deals_win_inner_cos);
mClGiftsBanner = view.findViewById(R.id.cl_deals_win_inner);
mTvDealsValue = view.findViewById(R.id.tv_deals_value);
mTvDealsValueAll = view.findViewById(R.id.tv_deals_value_all);
mTvActiveCode = view.findViewById(R.id.tv_active_deals_text);
mTvActiveDate = view.findViewById(R.id.tv_active_deals_date_text);
mIvDealsLogo = view.findViewById(R.id.dfy_logo);
mClDealsView = view.findViewById(R.id.cl_mygifts);
mLlDeals = view.findViewById(R.id.ll_mygifts);
mIvProfilePhoto = view.findViewById(R.id.iv_profile_photo);
mTvActiveTitle = view.findViewById(R.id.tv_active_gifts);
mTvActiveCouponsHeader = view.findViewById(R.id.tv_active_coupons_header);
mLlEmptyWallet = view.findViewById(R.id.ll_empty_wallet);
mLlActiveCodesView = view.findViewById(R.id.ll_active_deals_codes_view);
mScActiveCodes = view.findViewById(R.id.sv_active_deals_codes_view);
mLlGifts = view.findViewById(R.id.ll_gifts_view);
mLlMarketView = view.findViewById(R.id.ll_market_view);
mRvMarketCoupons = view.findViewById(R.id.rv_market_coupons);
mRvMarketCoupons.setNestedScrollingEnabled(false);
mRvMarketCoupons.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
mElGifts = view.findViewById(R.id.el_exp);
mClExp = view.findViewById(R.id.cl_exp);
mIvExpArrow = view.findViewById(R.id.iv_exp_arrow);
mTvMarketValue = view.findViewById(R.id.tv_market_value);
mTvMarketAll = view.findViewById(R.id.tv_market_value_all);
mClMarket = view.findViewById(R.id.cl_market_inner);
mTvFavValue = view.findViewById(R.id.tv_exp_value);
mTvFavValueAll = view.findViewById(R.id.tv_exp_value_all);
mLlHistory = view.findViewById(R.id.ll_loyalty_history);
mTvDealsCountBadge = view.findViewById(R.id.tv_deals_count);
mTvUnifiedCountBadge = view.findViewById(R.id.tv_sm_count);
......@@ -162,14 +102,11 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mRlDeals = view.findViewById(R.id.rv_deals_count);
mRlUnified = view.findViewById(R.id.rv_sm_count);
mRlGifts = view.findViewById(R.id.rv_gifts_count);
mRecyclerCoupons = view.findViewById(R.id.rv_active_coupons);
mCvVouchers = view.findViewById(R.id.cv_vouchers);
mCvVouchersDisabled = view.findViewById(R.id.cv_vouchers_disabled);
mLlVouchers = view.findViewById(R.id.ll_vouchers);
mLlVouchersDisabled = view.findViewById(R.id.ll_vouchers_disabled);
mLlVouchersSpinner = view.findViewById(R.id.ll_vouchers_spinner);
mSeparator = view.findViewById(R.id.v_separator_vouchers);
mSeparatorDisabled = view.findViewById(R.id.v_separator_vouchers_disabled);
mTvVouchersDisabledTitle = view.findViewById(R.id.tv_vouchers_title_disabled);
mTvVouchersDisabledSubtitle = view.findViewById(R.id.tv_vouchers_info_title_disabled);
mTvVouchersTitle = view.findViewById(R.id.tv_vouchers_title);
......@@ -213,8 +150,6 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mQuestionnairePressed = false;
mHistoryPressed = false;
mHistoryMarketPressed = false;
mUnifiedPressed = false;
mCouponPressed = false;
mHistoryBadgePressed = false;
mGiftsCountPressed = false;
mUnifiedCountPressed = false;
......@@ -327,17 +262,6 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
}
return;
}
if (view.getId() == R.id.cl_exp) {
if (!mIsStayCollapsed) {
mElGifts.toggle(true);
if (mElGifts.isExpanded()) {
mIvExpArrow.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_up_dark_new));
} else {
mIvExpArrow.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_down_dark_new));
}
}
return;
}
/** Unified History */
if (view.getId() == R.id.cl_market_inner) {
if (!mHistoryMarketPressed) {
......@@ -428,53 +352,38 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
@Subscribe()
public void onMessageEvent(WarplyEventBusManager event) {
if (event.getVouchersServiceUnavailableEventModel() != null) {
Handler mUIHandler = new Handler(Looper.getMainLooper());
mUIHandler.post(new Runnable() {
@Override
public void run() {
vouchersServiceUnavailableDialog();
}
});
mUIHandler.post(this::vouchersServiceUnavailableDialog);
return;
}
if (event.getVouchersFetched() != null) {
/** Vouchers */
Handler mUIHandler = new Handler(Looper.getMainLooper());
mUIHandler.post(new Runnable() {
@Override
public void run() {
checkForEmpty();
}
});
mUIHandler.post(this::checkForEmpty);
/** Vouchers */
return;
}
if (event.getUnifiedCouponsAdded() != null) {
Handler mUIHandler = new Handler(Looper.getMainLooper());
mUIHandler.post(new Runnable() {
@Override
public void run() {
mUIHandler.post(() -> {
if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0)
mTvUnifiedCountBadge.setText(String.valueOf(WarplyManagerHelper.getMarketCouponsList().size()));
else
mTvUnifiedCountBadge.setText("0");
checkHistoryEmpty();
checkForEmpty();
}
});
return;
}
if (event.getCouponsAdded() != null) {
Handler mUIHandler = new Handler(Looper.getMainLooper());
mUIHandler.post(new Runnable() {
@Override
public void run() {
mUIHandler.post(() -> {
if (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() > 0)
mTvGiftsCountBadge.setText(String.valueOf(WarplyManagerHelper.getCouponList().size()));
else
mTvGiftsCountBadge.setText("0");
checkHistoryEmpty();
checkForEmpty();
}
});
}
}
......@@ -510,20 +419,6 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
/** Deals Badge */
if (WarplyManagerHelper.getConsumer() != null) {
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
if (!TextUtils.isEmpty(WarplyManagerHelper.getConsumer().getImageUrl()) && !WarplyManagerHelper.getConsumer().getImageUrl().equals("null")) {
Glide.with(this)
.load(WarplyManagerHelper.getConsumer().getImageUrl())
.diskCacheStrategy(DiskCacheStrategy.DATA)
.into(mIvProfilePhoto);
} else {
Glide.with(this)
.load(R.drawable.ic_default_photo)
.into(mIvProfilePhoto);
}
if (!TextUtils.isEmpty(WarplyManagerHelper.getUserTag(getContext()))) {
mTvUserBadge.setText(WarplyManagerHelper.getUserTag(getContext()));
mLlQuestionnaire.setVisibility(View.GONE);
......@@ -534,17 +429,16 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
}
}
/** History View */
checkHistoryEmpty();
/** History View */
/** Empty View */
checkForEmpty();
/** Empty View */
mLlQuestionnaire.setOnClickListener(this);
mLlUserBadge.setOnClickListener(this);
mClDealsBanner.setOnClickListener(this);
mClGiftsBanner.setOnClickListener(this);
mClDealsView.setOnClickListener(this);
mClExp.setOnClickListener(this);
mClMarket.setOnClickListener(this);
mLlHistory.setOnClickListener(this);
mRlDeals.setOnClickListener(this);
mRlUnified.setOnClickListener(this);
......@@ -584,7 +478,6 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
if (TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) || (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))) {
/** Show spinner only if empty */
mLlVouchers.setVisibility(View.GONE);
mSeparator.setVisibility(View.VISIBLE);
if (TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()))
mLlVouchersSpinner.setVisibility(View.VISIBLE);
if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
......@@ -594,8 +487,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
&& (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
/** Hide all and show empty view */
mLlVouchers.setVisibility(View.GONE);
mLlVouchersSpinner.setVisibility(View.GONE);
mSeparator.setVisibility(View.VISIBLE);
// mLlVouchersSpinner.setVisibility(View.GONE);
if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
mLlEmptyWallet.setVisibility(View.VISIBLE);
} else {
/** Show loyalty banners and hide empty view
......@@ -617,16 +510,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
}
mLlVouchers.setVisibility(View.VISIBLE);
mLlVouchersDisabled.setVisibility(View.GONE);
mSeparatorDisabled.setVisibility(View.VISIBLE);
if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0)
&& (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() == 0)
&& (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
/** Hide loyalty banners and hide separator */
mSeparator.setVisibility(View.GONE);
mLlBannerInfo.setVisibility(View.GONE);
} else {
/** Show loyalty banners and show separator */
mSeparator.setVisibility(View.VISIBLE);
mLlBannerInfo.setVisibility(View.VISIBLE);
}
} else if (WarplyManagerHelper.getShowVouchersBanner().equals("false")) {
......@@ -634,7 +524,6 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mLlVouchersSpinner.setVisibility(View.GONE);
mLlEmptyWallet.setVisibility(View.GONE);
mLlVouchers.setVisibility(View.GONE);
mSeparator.setVisibility(View.VISIBLE);
if (TextUtils.isEmpty(WarpUtils.getLanguage(getContext())) || WarpUtils.getLanguage(getContext()).equals("el")) {
mTvVouchersDisabledTitle.setText(getString(R.string.cos_vouchers_title));
mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled));
......@@ -643,23 +532,55 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled_en));
}
mLlVouchersDisabled.setVisibility(View.VISIBLE);
mSeparatorDisabled.setVisibility(View.VISIBLE);
if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0)
&& (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() == 0)
&& (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
/** Hide loyalty banners and hide empty view and hide disabled separator */
mLlBannerInfo.setVisibility(View.GONE);
mLlEmptyWallet.setVisibility(View.GONE);
mSeparatorDisabled.setVisibility(View.GONE);
} else {
/** Show loyalty banners and show disabled separator */
mLlBannerInfo.setVisibility(View.VISIBLE);
mSeparatorDisabled.setVisibility(View.VISIBLE);
}
}
}
}
private void checkHistoryEmpty() {
mIsDealsEmpty = WarplyManagerHelper.getDealsCouponsSum() == 0;
if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) {
float countValue = 0.0f;
if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) {
if (WarplyManagerHelper.getCouponsetsDeals().size() > 0) {
for (Couponset couset : WarplyManagerHelper.getCouponsetsDeals()) {
for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
if (cou.getCouponsetUuid().equals(couset.getUuid())) {
countValue += Float.parseFloat(cou.getDiscount());
break;
}
}
}
}
}
mIsMarketsEmpty = countValue == 0;
} else {
mIsMarketsEmpty = true;
}
if (WarplyManagerHelper.getLoyaltyBadge() != null) {
mIsCouponsEmpty = WarplyManagerHelper.getLoyaltyBadge().getValue() == 0;
}
if (mIsDealsEmpty && mIsMarketsEmpty && mIsCouponsEmpty) {
mLlHistory.setVisibility(View.GONE);
} else {
mLlHistory.setVisibility(View.VISIBLE);
}
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
......
......@@ -43,7 +43,6 @@ import android.net.http.SslError;
import android.os.Build;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.webkit.GeolocationPermissions.Callback;
import android.webkit.JavascriptInterface;
import android.webkit.SslErrorHandler;
......@@ -84,7 +83,6 @@ import java.util.Map;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
import ly.warp.sdk.activities.LoyaltyWallet;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.db.WarplyDBHelper;
import ly.warp.sdk.io.models.CouponEventModel;
......@@ -494,8 +492,8 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
} else if (parts[1].equals("couponRetrieved")) {
EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel()));
} else if (parts[1].equals("loyaltyWallet")) {
Intent intent = new Intent((WarpActivity != null && !WarpActivity.isFinishing()) ? WarpActivity : getContext(), LoyaltyWallet.class);
getContext().startActivity(intent);
// Intent intent = new Intent((WarpActivity != null && !WarpActivity.isFinishing()) ? WarpActivity : getContext(), LoyaltyWallet.class);
// getContext().startActivity(intent);
RefreshVouchersEventModel vouchersRefreshed = new RefreshVouchersEventModel();
vouchersRefreshed.setRefreshed(true);
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke android:width="1dp" android:color="@color/cos_grey2" />
<corners android:radius="16dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke android:width="1dp" android:color="@color/cos_grey2_tr" />
<corners android:radius="16dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/round_border_grey_tr" android:state_pressed="true" />
<item android:drawable="@drawable/round_border_grey" android:state_pressed="false" />
</selector>
\ No newline at end of file
......@@ -33,7 +33,7 @@
android:textColor="@color/cos_light_black"
android:textSize="19sp"
fontPath="fonts/BTCosmo-Bold.ttf"
android:text="@string/cos_gifts_title"
android:text="@string/cos_free_coupons"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -19,7 +19,7 @@
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
android:src="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -46,23 +46,11 @@
android:layout_marginTop="16dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_coupons_header"
fontPath="fonts/PeridotPE-SemiBold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:maxLines="1"
android:text="@string/cos_redeemed_coupons_loyalty_title"
android:textColor="@color/cos_light_black"
android:textSize="22sp" />
<androidx.cardview.widget.CardView
android:id="@+id/cl_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="2dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="4dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
......@@ -179,7 +167,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_green_tr"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......@@ -260,7 +248,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_creme"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......@@ -341,7 +329,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_skyblue5"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......
......@@ -3,142 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_light_grey3">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_first_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="24dp"
android:paddingHorizontal="16dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iv_profile_photo"
android:layout_width="74dp"
android:layout_height="74dp"
android:padding="1dp"
android:src="@drawable/ic_default_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage"
app:strokeColor="@color/cos_grey2"
app:strokeWidth="1dp" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_profile_photo"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_profile_name"
fontPath="fonts/PeridotPE-SemiBold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/cos_light_black"
android:textSize="22sp"
tools:text="Test Name" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_user_badge"
android:layout_width="wrap_content"
android:layout_height="42dp"
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:id="@+id/tv_type"
fontPath="fonts/PeridotPE-SemiBold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:includeFontPadding="false"
android:textColor="@color/cos_green12"
android:textSize="16sp"
tools:text="@string/cos_profile_preferences_placeholder" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_user_questionnaire"
android:layout_width="160dp"
android:layout_height="42dp"
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="4dp"
android:src="@drawable/sv_plus_sign_green" />
<TextView
android:id="@+id/tv_questionnaire"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="@string/cos_profile_preferences"
android:textColor="@color/cos_green12"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_loyalty_history"
android:layout_width="52dp"
android:layout_height="42dp"
android:layout_marginStart="4dp"
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/sv_history" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:background="@color/white">
<LinearLayout
android:id="@+id/ll_second_view"
......@@ -159,14 +24,14 @@
<TextView
android:id="@+id/tv_coupons_header"
fontPath="fonts/PeridotPE-SemiBold.ttf"
fontPath="fonts/BTCosmo-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:maxLines="1"
android:text="@string/cos_coupons_loyalty_title"
android:text="@string/cos_coupons_header"
android:textColor="@color/cos_light_black"
android:textSize="22sp" />
android:textSize="20sp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -194,7 +59,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_green_tr">
android:background="@color/white">
<ImageView
android:id="@+id/iv_deals_logo_count"
......@@ -283,7 +148,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_creme">
android:background="@color/white">
<ImageView
android:id="@+id/iv_sm_logo_count"
......@@ -371,7 +236,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cos_skyblue5">
android:background="@color/white">
<ImageView
android:id="@+id/iv_gifts_logo_count"
......@@ -402,7 +267,7 @@
android:layout_marginHorizontal="8dp"
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/cos_gifts_title"
android:text="@string/cos_free_coupons"
android:textColor="@color/cos_light_black"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -440,6 +305,135 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_user_badge"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginHorizontal="14dp"
android:layout_marginTop="20dp"
android:background="@drawable/selector_button_grey_border"
android:gravity="center"
android:paddingHorizontal="16dp"
android:elevation="1dp"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:id="@+id/tv_type"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_right_questionnaire_answered"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@string/cos_profile_preferences_placeholder" />
<ImageView
android:id="@+id/iv_right_questionnaire_answered"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_right_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_user_questionnaire"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginHorizontal="14dp"
android:layout_marginTop="20dp"
android:background="@drawable/selector_button_grey_border"
android:gravity="center"
android:paddingHorizontal="16dp"
android:visibility="gone"
android:elevation="1dp"
tools:visibility="visible">
<ImageView
android:id="@+id/iv_plus_questionnaire"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_plus_sign_blue"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_questionnaire"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_profile_preferences"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_right_questionnaire"
app:layout_constraintStart_toEndOf="@+id/iv_plus_questionnaire"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_questionnaire"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_right_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_loyalty_history"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginHorizontal="14dp"
android:layout_marginTop="6dp"
android:background="@drawable/selector_button_grey_border"
android:gravity="center"
android:elevation="1dp"
android:paddingHorizontal="16dp">
<ImageView
android:id="@+id/iv_history_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_history_blue"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_profile_history"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_right_history"
app:layout_constraintStart_toEndOf="@+id/iv_history_icon"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_history"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_right_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_vouchers_spinner"
android:layout_width="match_parent"
......@@ -455,7 +449,7 @@
android:id="@+id/pb_vouchers"
android:layout_width="48dp"
android:layout_height="48dp"
android:theme="@style/progressBarGreen" />
android:theme="@style/progressBarBlue" />
</LinearLayout>
<LinearLayout
......@@ -466,30 +460,23 @@
android:layout_marginTop="32dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<View
android:id="@+id/v_separator_vouchers"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/cos_gray" />
tools:visibility="visible">
<TextView
fontPath="fonts/PeridotPE-SemiBold.ttf"
android:id="@+id/tv_vouchers_title"
fontPath="fonts/BTCosmo-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:includeFontPadding="false"
android:maxLines="1"
android:text="@string/cos_vouchers_title"
android:textColor="@color/cos_light_black"
android:textSize="22sp" />
android:textSize="20sp" />
<androidx.cardview.widget.CardView
android:id="@+id/cv_vouchers"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_height="60dp"
android:layout_marginHorizontal="2dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="4dp"
......@@ -518,10 +505,9 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:lineHeight="24dp"
android:text="@string/cos_vouchers_info_title"
android:textColor="@color/cos_light_black"
android:textSize="14sp"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/iv_vouchers_logo"
app:layout_constraintEnd_toStartOf="@+id/iv_vouchers_arrow"
app:layout_constraintHorizontal_bias="0.0"
......@@ -531,10 +517,9 @@
<ImageView
android:id="@+id/iv_vouchers_arrow"
android:layout_width="16dp"
android:layout_height="10dp"
android:layout_height="16dp"
android:layout_marginEnd="16dp"
android:rotation="270"
android:src="@drawable/sv_arrow_down"
android:src="@drawable/ic_right_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -550,30 +535,23 @@
android:layout_marginTop="32dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<View
android:id="@+id/v_separator_vouchers_disabled"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/cos_gray" />
tools:visibility="visible">
<TextView
fontPath="fonts/PeridotPE-SemiBold.ttf"
android:id="@+id/tv_vouchers_title_disabled"
fontPath="fonts/BTCosmo-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:includeFontPadding="false"
android:maxLines="1"
android:text="@string/cos_vouchers_title"
android:textColor="@color/cos_light_black"
android:textSize="22sp" />
android:textSize="20sp" />
<androidx.cardview.widget.CardView
android:id="@+id/cv_vouchers_disabled"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_height="60dp"
android:layout_marginHorizontal="2dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="4dp"
......@@ -602,10 +580,9 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:lineHeight="24dp"
android:text="@string/cos_vouchers_info_title_disabled"
android:textColor="@color/cos_gray2"
android:textSize="14sp"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/iv_vouchers_logo_disabled"
app:layout_constraintEnd_toStartOf="@+id/iv_vouchers_arrow_disabled"
app:layout_constraintHorizontal_bias="0.0"
......@@ -615,10 +592,9 @@
<ImageView
android:id="@+id/iv_vouchers_arrow_disabled"
android:layout_width="16dp"
android:layout_height="10dp"
android:layout_height="16dp"
android:layout_marginEnd="16dp"
android:rotation="270"
android:src="@drawable/sv_arrow_down"
android:src="@drawable/ic_right_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -658,11 +634,11 @@
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
tools:visibility="visible">
<ImageView
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/ic_empty_wallet" />
<TextView
......@@ -673,459 +649,7 @@
android:gravity="center"
android:text="@string/cos_empty_wallet"
android:textColor="@color/cos_light_black"
android:textSize="16sp" />
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/cl_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="11dp"
android:layout_marginTop="24dp"
android:visibility="gone"
app:cardCornerRadius="16dp"
app:cardElevation="2dp"
tools:visibility="gone">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="14dp"
android:paddingVertical="14dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_horizontal_64_exp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.64" />
<ImageView
android:id="@+id/iv_exp_logo"
android:layout_width="76dp"
android:layout_height="76dp"
android:layout_marginVertical="4dp"
android:src="@drawable/ic_foryou_polygon_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_exp_value"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/iv_exp_logo"
app:layout_constraintStart_toStartOf="@+id/iv_exp_logo"
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_64_exp"
tools:text="18.00€" />
<TextView
android:id="@+id/tv_exp_value_all"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_for_you_all"
android:textColor="@color/cos_light_black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_exp_arrow"
app:layout_constraintStart_toEndOf="@+id/iv_exp_logo"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_exp_arrow"
android:layout_width="14dp"
android:layout_height="14dp"
android:src="@drawable/ic_down_dark_new"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<net.cachapa.expandablelayout.ExpandableLayout
android:id="@+id/el_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:el_duration="300"
app:el_expanded="false"
app:el_parallax="0.5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:id="@+id/cv_deals_win_inner_cos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="6dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_deals_win_inner_cos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="6dp"
android:paddingVertical="4dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_horizontal_50_cos"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.64" />
<ImageView
android:id="@+id/iv_deals_logo"
android:layout_width="76dp"
android:layout_height="76dp"
android:src="@drawable/ic_deals_polygon_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_deals_value_all"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_deals_win_title_cos"
android:textColor="@color/cos_light_black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_deals_logo"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_deals_value"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/iv_deals_logo"
app:layout_constraintStart_toStartOf="@+id/iv_deals_logo"
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50_cos"
tools:text="18.00€" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cv_deals_win_inner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_deals_win_inner_cos"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="6dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_deals_win_inner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="6dp"
android:paddingVertical="4dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_horizontal_50"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.64" />
<ImageView
android:id="@+id/iv_gifts_logo"
android:layout_width="76dp"
android:layout_height="76dp"
android:src="@drawable/ic_gifts_polygon_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_gifts_value_all"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_deals_win_title"
android:textColor="@color/cos_light_black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_gifts_logo"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_gifts_value"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/iv_gifts_logo"
app:layout_constraintStart_toStartOf="@+id/iv_gifts_logo"
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50"
tools:text="20.00€" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cv_market_inner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_deals_win_inner"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_market_inner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="6dp"
android:paddingVertical="4dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_horizontal_50_market"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.64" />
<ImageView
android:id="@+id/iv_market_logo"
android:layout_width="76dp"
android:layout_height="76dp"
android:src="@drawable/ic_market_polygon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_market_value_all"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:includeFontPadding="false"
android:text="@string/cos_supermarket_win"
android:textColor="@color/cos_light_black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_market_logo"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_market_value"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/iv_market_logo"
app:layout_constraintStart_toStartOf="@+id/iv_market_logo"
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50_market"
tools:text="20.00€" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</net.cachapa.expandablelayout.ExpandableLayout>
<LinearLayout
android:id="@+id/ll_market_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:id="@+id/tv_market_header"
fontPath="fonts/BTCosmo-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginHorizontal="16dp"
android:layout_marginBottom="10dp"
android:text="@string/cos_market_title"
android:textColor="@color/cos_light_blue"
android:textSize="19sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_market_coupons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="2dp"
android:overScrollMode="never"
android:scrollbars="none" />
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_mygifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<ImageView
android:id="@+id/dfy_logo"
android:layout_width="200dp"
android:layout_height="30dp"
android:layout_gravity="start"
android:layout_marginHorizontal="16dp"
android:src="@drawable/ic_deals_horizontal" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="11dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="6dp"
android:paddingVertical="10dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_mygifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingVertical="8dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="24dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_deals_circle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_active_gifts"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/cos_light_black"
android:textSize="18sp"
tools:text="@string/cos_active_deals" />
<TextView
android:id="@+id/tv_active_deals_text"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/cos_light_black"
android:textIsSelectable="true"
android:textSize="18sp"
tools:text="961544809"
tools:visibility="gone" />
<ScrollView
android:id="@+id/sv_active_deals_codes_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:nestedScrollingEnabled="true"
android:visibility="gone">
<org.apmem.tools.layouts.FlowLayout
android:id="@+id/ll_active_deals_codes_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
</org.apmem.tools.layouts.FlowLayout>
</ScrollView>
<TextView
android:id="@+id/tv_active_deals_date_text"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/cos_light_black"
android:visibility="gone"
tools:text="@string/cos_active_coupon_date" />
</LinearLayout>
<ImageView
android:id="@+id/iv_deals_circle"
android:layout_width="86dp"
android:layout_height="86dp"
android:layout_marginVertical="4dp"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_deals_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_gifts_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:id="@+id/tv_active_coupons_header"
fontPath="fonts/BTCosmo-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginHorizontal="16dp"
android:layout_marginBottom="10dp"
android:text="@string/cos_gifts_title"
android:textColor="@color/cos_light_blue"
android:textSize="19sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_active_coupons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="2dp"
android:overScrollMode="never"
android:paddingBottom="40dp"
android:scrollbars="none" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
......
......@@ -19,6 +19,7 @@
<string name="cos_profile_more">Δες περισσότερα</string>
<string name="cos_gifts_title">GIFTS FOR YOU</string>
<string name="cos_more_title">MORE FOR YOU</string>
<string name="cos_free_coupons">FREE COUPONS</string>
<string name="menu_home">Αρχική</string>
<string name="menu_explore">Ανακάλυψε</string>
<string name="menu_shop">Shop</string>
......@@ -75,7 +76,7 @@
<string name="cos_gift_it">Δώρισέ το</string>
<string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string>
<string name="cos_popup_more_subtitle">Σε αυτή την ενότητα βρες έρευνες, παιχνίδια, διαγωνισμούς και επιβραβεύσεις για τις αθλητικές σου δραστηριότητες!</string>
<string name="cos_deals_win_title">Μέχρι τώρα έχεις όφελος %1$s€ από τα GIFTS FOR YOU</string>
<string name="cos_deals_win_title">Μέχρι τώρα έχεις όφελος %1$s€ από τα FREE COUPONS</string>
<string name="cos_deals_win_title_cos">Μέχρι τώρα έχεις όφελος %1$s€ από τα DEALS FOR YOU</string>
<string name="cos_mygifts">Τα δώρα μου</string>
<string name="cos_gifts_banner_title">Δώρα:</string>
......@@ -94,7 +95,8 @@
<string name="cos_dlg_reject_text">Το δώρο θα επιστραφεί και δεν θα μπορεί να ενεργοποιηθεί ξανά.</string>
<string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string>
<string name="cos_dlg_negative_button2">Άκυρο</string>
<string name="cos_profile_preferences">Προτιμήσεις</string>
<string name="cos_profile_preferences">Πρόσθεσε τις προτιμήσεις σου</string>
<string name="cos_profile_history">Δες το ιστορικό σου</string>
<string name="cos_shops">Δες τα καταστήματα</string>
<string name="cos_website">Δες το eshop</string>
<string name="cos_coupon_shops_title">Καταστήματα</string>
......@@ -122,7 +124,7 @@
<string name="cos_shared_coupon_receiver">Εκπτωτικό κουπόνι προς</string>
<string name="cos_shared_coupon_sender">Έκπτωτικό κουπόνι από</string>
<string name="cos_steps_for_good_notification_title">Steps For Good</string>
<string name="cos_empty_wallet">Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!</string>
<string name="cos_empty_wallet">Δεν έχεις ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές</string>
<string name="cos_wallet_text1">Μέχρι τώρα έχεις κερδίσει&#160;</string>
<string name="cos_wallet_text2">&#160;με το DEALS for YOU!</string>
<string name="cos_wallet_text3">Μέχρι τώρα έχεις κερδίσει&#160;</string>
......@@ -212,6 +214,7 @@
<string name="cos_dlg_return">Επιστροφή</string>
<string name="cos_vouchers_info_title_disabled">Διαθέσιμο υπόλοιπο</string>
<string name="cos_vouchers_info_title_disabled_en">Available balance</string>
<string name="cos_coupons_header">Κουπόνια</string>
<string-array name="coupons_array">
<item>Κουπόνια</item>
......
......@@ -72,4 +72,8 @@
<item name="colorAccent">@color/cos_green12</item>
</style>
<style name="progressBarBlue" parent="@style/Theme.AppCompat">
<item name="colorAccent">@color/cos_light_blue</item>
</style>
</resources>
\ No newline at end of file
......