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"
......
......@@ -79,15 +79,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_gift_circle_logo"
android:layout_marginTop="32dp"
android:layout_marginTop="30dp"
tools:visibility="gone">
<androidx.cardview.widget.CardView
android:id="@+id/cv_expired_coupons_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="2dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<LinearLayout
android:id="@+id/ll_expired_coupons_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:background="@drawable/shape_cos_white_border"
android:background="@color/white"
android:gravity="center"
android:paddingVertical="16dp">
<TextView
......@@ -103,14 +112,22 @@
android:textSize="16sp"
tools:text="@string/cos_deals_win_title" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<RelativeLayout
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_expired_coupons_title"
android:layout_below="@+id/cv_expired_coupons_title"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="12dp"
android:background="@drawable/shape_cos_white_border"
android:layout_marginBottom="6dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp">
......@@ -124,7 +141,6 @@
android:textColor="@color/cos_light_black"
android:textSize="21sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -168,7 +184,6 @@
android:src="@drawable/ic_down_dark_new" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/tv_expired_empty"
......@@ -183,18 +198,28 @@
android:textSize="16sp"
android:visibility="gone" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
<RelativeLayout
<androidx.cardview.widget.CardView
android:id="@+id/rl_shared_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_gift_circle_logo"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="32dp"
android:background="@drawable/shape_cos_white_border"
android:layout_marginTop="30dp"
android:layout_marginBottom="6dp"
android:visibility="gone"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@color/white"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp"
android:visibility="gone">
android:paddingVertical="16dp">
<TextView
android:id="@+id/tv_shared_title"
......@@ -205,7 +230,6 @@
android:textColor="@color/cos_light_black"
android:textSize="21sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -263,6 +287,7 @@
android:textSize="16sp"
android:visibility="gone" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
\ No newline at end of file
......
......@@ -82,12 +82,21 @@
android:layout_marginTop="32dp"
tools:visibility="gone">
<androidx.cardview.widget.CardView
android:id="@+id/cv_expired_coupons_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="2dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<LinearLayout
android:id="@+id/ll_expired_coupons_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:background="@drawable/shape_cos_white_border"
android:background="@color/white"
android:gravity="center"
android:paddingVertical="16dp">
<TextView
......@@ -103,14 +112,22 @@
android:textSize="16sp"
tools:text="@string/cos_deals_win_title" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<RelativeLayout
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_expired_coupons_title"
android:layout_below="@+id/cv_expired_coupons_title"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="12dp"
android:background="@drawable/shape_cos_white_border"
android:layout_marginBottom="6dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp">
......@@ -168,7 +185,6 @@
android:src="@drawable/ic_down_dark_new" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/tv_expired_empty"
......@@ -183,18 +199,28 @@
android:textSize="16sp"
android:visibility="gone" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
<RelativeLayout
<androidx.cardview.widget.CardView
android:id="@+id/rl_shared_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_gift_circle_logo"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="32dp"
android:background="@drawable/shape_cos_white_border"
android:layout_marginTop="30dp"
android:layout_marginBottom="6dp"
android:visibility="gone"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@color/white"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp"
android:visibility="gone">
android:paddingVertical="16dp">
<TextView
android:id="@+id/tv_shared_title"
......@@ -205,7 +231,6 @@
android:textColor="@color/cos_light_black"
android:textSize="21sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -263,6 +288,7 @@
android:textSize="16sp"
android:visibility="gone" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
\ No newline at end of file
......
......@@ -62,11 +62,14 @@
android:id="@+id/iv_profile_photo"
android:layout_width="70dp"
android:layout_height="70dp"
android:padding="1dp"
android:src="@drawable/ic_default_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage"
app:strokeColor="@color/cos_grey2"
app:strokeWidth="1dp"
tools:background="@color/cos_cyan3" />
<TextView
......@@ -195,10 +198,10 @@
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"
android:visibility="gone"/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<net.cachapa.expandablelayout.ExpandableLayout
......@@ -429,13 +432,23 @@
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:layout_marginHorizontal="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/shape_cos_white_border"
android:background="@color/white"
android:paddingVertical="10dp">
<LinearLayout
......@@ -507,6 +520,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
......
......@@ -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"
......