Panagiotis Triantafyllou

merge with redesign branch part1

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc52'
PUBLISH_VERSION = '4.5.4.6rc53'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -13,6 +13,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
......@@ -58,7 +59,8 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis
private ExpiredCouponAdapter mAdapterExpiredCoupons;
private SharedCouponAdapter mAdapterSharedCoupons;
private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared;
private RelativeLayout mRlExpiredView, mRlSharedView;
private RelativeLayout mRlExpiredView;
private CardView mRlSharedView;
private SharingList mSharedCoupons = new SharingList();
private int mTimer = 0;
private Handler mSecondsHandler;
......
......@@ -136,11 +136,12 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
Date newDate = new Date();
try {
newDate = simpleDateFormat.parse(couponItem.getChangesDates().optString("redeemed"));
simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : ""));
} catch (ParseException e) {
e.printStackTrace();
holder.tvCouponDate.setVisibility(View.GONE);
}
simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : ""));
String itemValue = String.format("%.02f", Float.valueOf(couponItem.getDiscount()));
holder.tvCouponValue.setText(itemValue + mContext.getResources().getString(R.string.euro));
......
......@@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="16dp" />
<stroke android:width="1dp" android:color="@color/cos_grey2" />
<!-- <stroke android:width="1dp" android:color="@color/cos_grey2" />-->
<solid
android:color="@color/white" />
</shape>
\ No newline at end of file
......
......@@ -6,8 +6,8 @@
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginHorizontal="6dp"
android:layout_marginVertical="6dp"
android:background="@drawable/ic_coupon_background_new2">
android:layout_marginBottom="3dp"
android:background="@drawable/ic_coupon_background_new3">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_72_percent"
......@@ -92,8 +92,8 @@
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="3"
android:ellipsize="end"
android:maxLines="3"
android:textColor="@color/cos_light_black"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
......
......@@ -54,7 +54,7 @@
android:orientation="vertical"
android:overScrollMode="never"
android:scrollbars="none"
android:paddingVertical="24dp" />
android:paddingVertical="16dp" />
</RelativeLayout>
<TextView
......
......@@ -59,7 +59,7 @@
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="295dp"
android:layout_height="255dp"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
......
......@@ -43,8 +43,8 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
android:overScrollMode="never">
android:overScrollMode="never"
android:scrollbars="none">
<LinearLayout
android:id="@+id/cl_loyalty_info_view_inner"
......@@ -57,7 +57,7 @@
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="295dp"
android:layout_height="255dp"
android:scaleType="centerCrop"
tools:src="@drawable/carousel_banner" />
......@@ -115,9 +115,9 @@
android:layout_height="50dp"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="12dp"
android:includeFontPadding="false"
android:background="@drawable/banner_border_light_grey"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/cos_light_black"
android:textIsSelectable="true"
android:textSize="25sp"
......@@ -129,8 +129,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:id="@+id/ll_barcode_container_items"
......@@ -144,8 +144,8 @@
<View
android:id="@+id/view5"
android:layout_width="match_parent"
android:layout_marginHorizontal="32dp"
android:layout_height="0.8dp"
android:layout_marginHorizontal="32dp"
android:background="#E6E6E6" />
<ImageView
......@@ -169,8 +169,8 @@
<View
android:id="@+id/view4"
android:layout_width="match_parent"
android:layout_marginHorizontal="32dp"
android:layout_height="0.8dp"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="20dp"
android:background="#E6E6E6" />
</LinearLayout>
......@@ -181,9 +181,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible"
android:orientation="horizontal">
tools:visibility="visible">
<TextView
android:id="@+id/tv_barcode"
......@@ -211,8 +211,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="24dp"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
android:textColor="@color/cos_gray"
tools:text="@string/cos_coupon_date" />
<LinearLayout
......@@ -317,8 +317,8 @@
android:id="@+id/iv_terms_arrow"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginTop="3dp"
android:layout_marginStart="6dp"
android:layout_marginTop="3dp"
android:src="@drawable/ic_down_dark_new" />
</LinearLayout>
......@@ -330,7 +330,7 @@
android:layout_below="@+id/ll_terms_inner"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="16dp"
android:textColor="@color/cos_gray"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
android:visibility="gone"
tools:text="@string/cos_coupon_date"
......
......@@ -59,7 +59,7 @@
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="295dp"
android:layout_height="255dp"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
......
......@@ -55,7 +55,7 @@
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="295dp"
android:layout_height="255dp"
android:scaleType="centerCrop"
tools:src="@drawable/carousel_banner" />
......@@ -144,7 +144,7 @@
android:layout_below="@+id/ll_terms_inner"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="16dp"
android:textColor="@color/cos_gray"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
android:visibility="gone"
tools:text="@string/cos_coupon_date"
......
......@@ -16,8 +16,8 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_close"
android:scaleType="centerInside"
android:src="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -41,15 +41,15 @@
android:layout_height="match_parent"
android:layout_below="@+id/cl_loyalty_wallet_header"
android:background="@color/white"
android:scrollbars="none"
android:fillViewport="true">
android:fillViewport="true"
android:scrollbars="none">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<!-- android:background="@drawable/shape_cos_loyalty_white"-->
<!-- android:background="@drawable/shape_cos_loyalty_white"-->
<RelativeLayout
android:id="@+id/cl_loyalty_info_view_inner"
android:layout_width="match_parent"
......@@ -63,7 +63,7 @@
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="295dp"
android:layout_height="255dp"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
tools:src="@drawable/carousel_banner" />
......@@ -200,8 +200,8 @@
android:id="@+id/iv_see_more_arrow"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginTop="3dp"
android:layout_marginStart="6dp"
android:layout_marginTop="3dp"
android:src="@drawable/ic_down_dark_new" />
</LinearLayout>
......@@ -213,11 +213,11 @@
android:layout_below="@+id/ll_see_more"
android:layout_marginHorizontal="32dp"
android:layout_marginTop="16dp"
android:textColor="@color/cos_gray"
android:textColor="@color/cos_light_black"
android:textSize="16sp"
android:visibility="gone"
tools:visibility="visible"
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
tools:visibility="visible" />
</RelativeLayout>
</RelativeLayout>
......
......@@ -10,13 +10,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="16dp"
app:cardElevation="0dp"
app:cardCornerRadius="16dp">
android:layout_marginBottom="2dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selector_cos_campaign">
android:layout_height="match_parent">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_60_percent"
......@@ -38,13 +38,13 @@
<TextView
android:id="@+id/tv_campaign_title"
fontPath="fonts/PeridotPE-Regular.ttf"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:gravity="center"
android:maxLines="4"
android:textColor="@color/cos_light_black"
fontPath="fonts/PeridotPE-Regular.ttf"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent"
app:layout_constraintRight_toRightOf="parent"
......@@ -62,7 +62,7 @@
android:layout_marginEnd="10dp"
android:scaleType="centerCrop"
android:src="@drawable/ic_new_icon"
android:translationZ="2dp"
android:translationZ="5dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
......