Panagiotis Triantafyllou

more fixes and changes

Showing 22 changed files with 262 additions and 276 deletions
......@@ -67,6 +67,11 @@
android:screenOrientation="portrait" />
<activity
android:name="ly.warp.sdk.activities.LoyaltyWallet"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="ly.warp.sdk.dexter.PermissionsActivity"
android:exported="false"
android:launchMode="singleInstance"
......
......@@ -15,10 +15,8 @@ import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.oned.EAN13Writer;
import com.google.zxing.qrcode.QRCodeWriter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -94,16 +92,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
mTvCouponCode.setText(mCoupon.getCoupon());
mTvCouponTitle.setText(mCoupon.getName());
mTvCouponSubtitle.setText(mCoupon.getDescription());
String strCurrentDate = mCoupon.getExpiration();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = format.parse(strCurrentDate);
newDate = simpleDateFormat.parse(mCoupon.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
mTvCouponDate.setText(String.format(getResources().getString(R.string.cos_coupon_date),
format.format(newDate)));
simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
mTvCouponDate.setText(String.format(getResources().getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : "")));
if (!TextUtils.isEmpty(mCoupon.getImage())) {
Glide.with(this)
// .setDefaultRequestOptions(
......
......@@ -10,16 +10,7 @@ import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.io.Serializable;
import ly.warp.sdk.R;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.views.adapters.HomeCouponAdapter;
public class LoyaltyActivity extends Activity implements View.OnClickListener,
......@@ -34,10 +25,8 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
// ===========================================================
private ImageView mIvBack;
private RecyclerView mRecyclerCoupons, mRecyclerBurntCoupons;
private HomeCouponAdapter mAdapterCoupons, mAdapterBurntCoupons;
private Spinner mCouponSpinner, mRedemptionSpinner;
private TextView mTvAnalysisButton, mTvUsername, mTvQuestionnaire;
private TextView mTvAnalysisButton;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -49,14 +38,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
setContentView(R.layout.activity_loyalty);
mIvBack = findViewById(R.id.iv_back);
mRecyclerCoupons = findViewById(R.id.rv_loyalty_coupons);
mRecyclerBurntCoupons = findViewById(R.id.rv_loyalty_burnt_coupons);
mCouponSpinner = findViewById(R.id.sp_coupons);
mRedemptionSpinner = findViewById(R.id.sp_redemption);
mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details);
mTvUsername = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_card_username);
mTvQuestionnaire = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_questionnaire);
initViews();
}
......@@ -75,24 +59,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
if (view.getId() == R.id.tv_analysis_details) {
Intent intent = new Intent(this, CouponTransactionActivity.class);
startActivity(intent);
return;
}
if (view.getId() == R.id.tv_questionnaire) {
CampaignList cl = WarplyManagerHelper.getUniqueCampaignList().get("more");
Campaign camp = null;
if (cl != null) {
for (Campaign cn : cl) {
if (cn.getSessionUUID().equals("4fc2865e32bd4d5495a3dfdf1472da7f")) {
camp = cn;
break;
}
}
}
if (camp == null)
return;
startActivity(WarpViewActivity.createIntentFromURL(LoyaltyActivity.this, WarplyManagerHelper.constructCampaignUrl(camp)));
}
}
......@@ -109,8 +75,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.GONE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.GONE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.GONE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.VISIBLE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.VISIBLE);
} else {
mRedemptionSpinner.setVisibility(View.VISIBLE);
findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).setVisibility(View.VISIBLE);
......@@ -119,8 +83,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.VISIBLE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.VISIBLE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.VISIBLE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.GONE);
findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.GONE);
}
}
}
......@@ -135,30 +97,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
// ===========================================================
private void initViews() {
if (WarplyManagerHelper.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
mIvBack.setOnClickListener(this);
mTvAnalysisButton.setOnClickListener(this);
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mAdapterCoupons = new HomeCouponAdapter(this, WarplyManagerHelper.getCouponList());
mRecyclerCoupons.setAdapter(mAdapterCoupons);
mAdapterCoupons.getPositionClicks()
.doOnNext(coupon -> {
Intent intent = new Intent(this, CouponInfoActivity.class);
intent.putExtra("coupon", (Serializable) coupon);
startActivity(intent);
})
.doOnError(error -> {
})
.subscribe();
mRecyclerBurntCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mAdapterBurntCoupons = new HomeCouponAdapter(this, WarplyManagerHelper.getCouponList(), true);
mRecyclerBurntCoupons.setAdapter(mAdapterBurntCoupons);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
R.array.coupons_array, R.layout.spinner_item);
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item_grey);
......@@ -170,8 +111,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue);
mRedemptionSpinner.setAdapter(adapter2);
mRedemptionSpinner.setOnItemSelectedListener(this);
mTvQuestionnaire.setOnClickListener(this);
}
// ===========================================================
......
package ly.warp.sdk.activities;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import ly.warp.sdk.R;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.utils.WarplyManagerHelper;
public class LoyaltyWallet extends Activity implements View.OnClickListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
private ImageView mIvBack;
private TextView mTvUsername, mTvQuestionnaire, mTvActiveCoupons,
mTvActiveRewards;
private ConstraintLayout mClActiveCoupons, mClActiveRewards;
private LinearLayout mLlAnalysisButton;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loyalty_wallet);
mIvBack = findViewById(R.id.iv_back);
// mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details);
mTvUsername = findViewById(R.id.tv_name);
// mTvQuestionnaire = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_questionnaire);
mClActiveCoupons = findViewById(R.id.cl_loyalty_coupon);
mTvActiveCoupons = findViewById(R.id.tv_active_coupons);
mClActiveRewards = findViewById(R.id.cl_loyalty_rewards);
mTvActiveRewards = findViewById(R.id.tv_active_rewards);
mLlAnalysisButton = findViewById(R.id.ll_analysis);
initViews();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onClick(View view) {
if (view.getId() == R.id.iv_back) {
onBackPressed();
return;
}
if (view.getId() == R.id.ll_analysis) {
Intent intent = new Intent(this, LoyaltyActivity.class);
startActivity(intent);
return;
}
if (view.getId() == R.id.tv_questionnaire) {
CampaignList cl = WarplyManagerHelper.getUniqueCampaignList().get("more_for_you");
Campaign camp = null;
if (cl != null) {
for (Campaign cn : cl) {
if (cn.getSessionUUID().equals("4fc2865e32bd4d5495a3dfdf1472da7f")) {
camp = cn;
break;
}
}
}
if (camp == null)
return;
startActivity(WarpViewActivity.createIntentFromURL(LoyaltyWallet.this, WarplyManagerHelper.constructCampaignUrl(camp)));
return;
}
if (view.getId() == R.id.cl_loyalty_coupon) {
Intent intent = new Intent(LoyaltyWallet.this, ActiveCouponsActivity.class);
intent.putExtra("couponlist", WarplyManagerHelper.getCouponList());
startActivity(intent);
return;
}
if (view.getId() == R.id.cl_loyalty_rewards) {
}
}
// ===========================================================
// Methods
// ===========================================================
private void initViews() {
if (WarplyManagerHelper.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
mIvBack.setOnClickListener(this);
// mTvAnalysisButton.setOnClickListener(this);
// mTvQuestionnaire.setOnClickListener(this);
mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(WarplyManagerHelper.getCouponList().size())));
mClActiveCoupons.setOnClickListener(this);
//TODO: change the parameter, for testing purposes only
mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size())));
mClActiveRewards.setOnClickListener(this);
mLlAnalysisButton.setOnClickListener(this);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
......@@ -16,7 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.GiftsForYouActivity;
import ly.warp.sdk.activities.LoyaltyActivity;
import ly.warp.sdk.activities.LoyaltyWallet;
import ly.warp.sdk.activities.MoreForYouActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.utils.WarplyManagerHelper;
......@@ -121,7 +121,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(), LoyaltyActivity.class);
Intent intent = new Intent(getContext(), LoyaltyWallet.class);
startActivity(intent);
return;
}
......
......@@ -100,15 +100,15 @@ public class CouponsetsAdapter extends RecyclerView.Adapter<CouponsetsAdapter.Co
holder.tvCouponTitle.setText(couponsetItem.getName());
holder.tvCouponDescription.setText(Html.fromHtml(couponsetItem.getDescription()));
String strCurrentDate = couponsetItem.getExpiration();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = format.parse(strCurrentDate);
newDate = simpleDateFormat.parse(couponsetItem.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), format.format(newDate)));
simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : "")));
holder.tvCouponValue.setText(couponsetItem.getDiscount());
holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponsetItem));
......
......@@ -101,17 +101,17 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
holder.tvCouponTitle.setText(couponItem.getName());
holder.tvCouponDescription.setText(couponItem.getDescription());
String strCurrentDate = couponItem.getExpiration();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = format.parse(strCurrentDate);
newDate = simpleDateFormat.parse(couponItem.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), format.format(newDate)));
simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : "")));
holder.tvCouponValue.setText(couponItem.getDiscount());
holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro));
holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem));
}
}
......
......@@ -3,10 +3,9 @@
<item>
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="#C4F187"
android:startColor="#8EF593" />
android:angle="180"
android:endColor="@color/cos_cyan2"
android:startColor="@color/cos_green7" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_cos_grey2_tr" android:state_pressed="true" />
<item android:drawable="@drawable/shape_cos_grey2" android:state_pressed="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="7dp" />
<solid
android:width="2dp"
android:color="@color/cos_grey2" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="7dp" />
<solid
android:width="2dp"
android:color="@color/cos_grey2_tr" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="11dp" />
<solid
android:color="@color/grey_tr3" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@android:color/white" />
</shape>
\ No newline at end of file
......@@ -2,7 +2,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F3F3F3">
android:background="@color/grey4">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_loyalty_wallet_header"
......@@ -23,7 +23,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cos_profile_title"
android:text="@string/cos_analysis"
android:textColor="@color/grey"
android:textSize="17sp"
android:textStyle="bold"
......@@ -37,86 +37,43 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cl_loyalty_wallet_header"
android:background="#F3F3F3">
android:background="@color/grey4">
<androidx.constraintlayout.widget.ConstraintLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white">
<include
android:id="@+id/cl_tab_analysis"
layout="@layout/tab_analysis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingTop="48dp">
android:layout_marginHorizontal="48dp"
android:layout_marginVertical="24dp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_loyalty_info_view_inner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cl_tab_analysis"
android:background="@drawable/shape_cos_loyalty"
android:paddingBottom="48dp"
android:paddingBottom="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
android:id="@+id/rl_coupons_row"
layout="@layout/loyalty_coupons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="110dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/rl_gifts_row"
layout="@layout/loyalty_gifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_coupons_row" />
<include
android:id="@+id/rl_analysis_row"
layout="@layout/loyalty_analysis_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_gifts_row" />
<include
android:id="@+id/rl_burnt_coupons_row"
layout="@layout/loyalty_burnt_coupons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_analysis_row" />
<include
android:id="@+id/rl_redeemed_gifts_row"
layout="@layout/loyalty_redeemed_gifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_burnt_coupons_row" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/cl_loyalty_info_banner"
layout="@layout/loyalty_banner"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginHorizontal="32dp"
app:layout_constraintBottom_toTopOf="@+id/cl_loyalty_info_view_inner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/cl_loyalty_info_view_inner" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
......
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
android:paddingBottom="24dp">
<LinearLayout
android:id="@+id/ll_analysis_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_cos_grey3"
android:orientation="vertical"
android:padding="24dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/analysis_tab"
......@@ -37,7 +44,6 @@
android:text="60%"
android:textColor="#00CB09"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -47,6 +53,7 @@
android:id="@+id/analysis_tab2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/analysis_tab"
android:layout_marginVertical="20dp">
<ImageView
......@@ -76,7 +83,6 @@
android:text="22%"
android:textColor="#9973F3"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -85,7 +91,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/analysis_tab3"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_below="@+id/analysis_tab2">
<ImageView
android:id="@+id/iv_chart_icon3"
......@@ -114,101 +121,24 @@
android:text="18%"
android:textColor="#0072C9"
android:textSize="17sp"
android:textStyle="bold"
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/analysis_tab4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp">
<ImageView
android:id="@+id/iv_chart_icon4"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_food"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Γεύση"
android:textColor="#4D4C58"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_chart_icon4"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="77%"
android:textColor="#00CB09"
android:textSize="17sp"
android:textStyle="bold"
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/analysis_tab5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp">
<ImageView
android:id="@+id/iv_chart_icon5"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_bag"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Shopping"
android:textColor="#4D4C58"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_chart_icon5"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="23%"
android:textColor="#0072C9"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_analysis_details"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/ll_analysis_tab"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="48dp"
android:background="@drawable/shape_cos_gradient"
android:layout_marginTop="36dp"
android:background="@drawable/shape_cos_green"
android:gravity="center"
android:paddingHorizontal="64dp"
android:text="Αναλυτικά"
android:text="@string/cos_analysis2"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
\ No newline at end of file
</RelativeLayout>
\ No newline at end of file
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_analysis_loyalty_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="Ανάλυση"
android:textColor="@color/grey"
android:textSize="18sp"
android:textStyle="bold" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_analysis_loyalty_title"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="24dp"
android:background="@drawable/shape_cos_white"
android:paddingHorizontal="16dp"
android:paddingVertical="24dp">
......@@ -35,18 +22,19 @@
android:spinnerMode="dropdown" />
<include
android:id="@+id/cl_tab_analysis"
layout="@layout/tab_analysis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cl_chart"
layout="@layout/cos_piechart_conditional_render"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_below="@+id/sp_coupons"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp" />
<Spinner
android:id="@+id/sp_redemption"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="@+id/cl_tab_analysis"
android:layout_below="@+id/cl_chart"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:background="@drawable/shape_cos_sky_blue"
......@@ -55,30 +43,12 @@
android:popupElevation="1dp"
android:spinnerMode="dropdown" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/sp_redemption"
android:layout_marginTop="32dp">
<include
android:id="@+id/cl_chart"
layout="@layout/cos_piechart_conditional_render"
android:layout_width="200dp"
android:layout_height="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/cl_chart_info"
layout="@layout/cos_analysis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:layout_constraintEnd_toEndOf="@+id/cl_chart"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_chart" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_below="@+id/sp_redemption"
android:layout_marginTop="32dp" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......
......@@ -9,8 +9,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bottom_border_gradient"
android:text="ΜΗΝΙΑΙΑ"
android:textColor="@color/grey"
android:text="@string/cos_monthly"
android:textColor="@color/cos_cyan3"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -23,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bottom_border_transparent"
android:text="6ΜΗΝΟ"
android:text="@string/cos_six_months"
android:textColor="@color/grey"
android:textSize="18sp"
android:textStyle="bold"
......@@ -37,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bottom_border_transparent"
android:text="12ΜΗΝΟ"
android:text="@string/cos_annual"
android:textColor="@color/grey"
android:textSize="18sp"
android:textStyle="bold"
......
......@@ -27,4 +27,14 @@
<color name="cos_green5">#79BF14</color>
<color name="cos_green5_tr">#6679BF14</color>
<color name="blue_dark">#3A5266</color>
<color name="white_tr4">#A1FFFFFF</color>
<color name="cos_green6">#509E2F</color>
<color name="cos_grey2">#E6E6E6</color>
<color name="cos_grey2_tr">#66E6E6E6</color>
<color name="cos_grey3">#84929E</color>
<color name="cos_cyan2">#6DBCC0</color>
<color name="cos_green7">#B2CF81</color>
<color name="cos_cyan3">#2EB2B9</color>
<color name="grey4">#F3F3F3</color>
<color name="grey_tr3">#7DF2F2F2</color>
</resources>
\ No newline at end of file
......
......@@ -41,6 +41,19 @@
<string name="cos_dlg_error_subtitle">Κάτι πήγε στραβά</string>
<string name="cos_dlg_error_subtitle_non_buyable">Το κουπόνι δεν είναι διαθέσιμο για αγορά</string>
<string name="cos_dlg_error_subtitle_no_points">Δεν έχεις αρκετούς πόντους</string>
<string name="cos_loyalty_coupons">My coupons</string>
<string name="cos_loyalty_old_coupons">Παλαιότερα κουπόνια</string>
<string name="cos_loyalty_rewards">My rewards</string>
<string name="cos_loyalty_old_rewards">Παλαιότερα δώρα</string>
<string name="cos_see_all">Δες τα όλα -></string>
<string name="cos_active_rewards">Έχεις %1$s ενεργά\nδώρα</string>
<string name="cos_analysis">Ανάλυση</string>
<string name="cos_active_deals">Ενεργός κωδικός:</string>
<string name="cos_monthly">Μηνιαία</string>
<string name="cos_six_months">6Μηνο</string>
<string name="cos_annual">12Μηνο</string>
<string name="cos_analysis2">Αναλυτικά</string>
<string name="euro"></string>
<string-array name="coupons_array">
<item>Κουπόνια</item>
......