Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2022-04-20 16:27:47 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6885cb28b5ec866e07936129b2bc25a8fa0182e
f6885cb2
1 parent
0bc000f9
more fixes and changes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
245 additions
and
189 deletions
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/CouponsetsAdapter.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/mix/ActiveCouponAdapter.java
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_deals.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_rewards.png
warply_android_sdk/src/main/res/drawable/bottom_border_gradient.xml
warply_android_sdk/src/main/res/drawable/selector_button_grey.xml
warply_android_sdk/src/main/res/drawable/shape_cos_grey2.xml
warply_android_sdk/src/main/res/drawable/shape_cos_grey2_tr.xml
warply_android_sdk/src/main/res/drawable/shape_cos_grey3.xml
warply_android_sdk/src/main/res/drawable/shape_cos_white2.xml
warply_android_sdk/src/main/res/layout/activity_loyalty.xml
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
warply_android_sdk/src/main/res/layout/cos_analysis.xml
warply_android_sdk/src/main/res/layout/loyalty_analysis_container.xml
warply_android_sdk/src/main/res/layout/tab_analysis.xml
warply_android_sdk/src/main/res/values/colors.xml
warply_android_sdk/src/main/res/values/strings.xml
warply_android_sdk/src/main/AndroidManifest.xml
View file @
f6885cb
...
...
@@ -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"
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
View file @
f6885cb
...
...
@@ -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(
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
View file @
f6885cb
...
...
@@ -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
);
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
0 → 100644
View file @
f6885cb
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
// ===========================================================
}
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
View file @
f6885cb
...
...
@@ -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.Loyalty
Activity
;
import
ly.warp.sdk.activities.Loyalty
Wallet
;
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
(),
Loyalty
Activity
.
class
);
Intent
intent
=
new
Intent
(
getContext
(),
Loyalty
Wallet
.
class
);
startActivity
(
intent
);
return
;
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/CouponsetsAdapter.java
View file @
f6885cb
...
...
@@ -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
));
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/mix/ActiveCouponAdapter.java
View file @
f6885cb
...
...
@@ -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
));
}
}
...
...
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_deals.png
0 → 100644
View file @
f6885cb
20.9 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_rewards.png
0 → 100644
View file @
f6885cb
7.93 KB
warply_android_sdk/src/main/res/drawable/bottom_border_gradient.xml
View file @
f6885cb
...
...
@@ -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>
...
...
warply_android_sdk/src/main/res/drawable/selector_button_grey.xml
0 → 100644
View file @
f6885cb
<?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
warply_android_sdk/src/main/res/drawable/shape_cos_grey2.xml
0 → 100644
View file @
f6885cb
<?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
warply_android_sdk/src/main/res/drawable/shape_cos_grey2_tr.xml
0 → 100644
View file @
f6885cb
<?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
warply_android_sdk/src/main/res/drawable/shape_cos_grey3.xml
0 → 100644
View file @
f6885cb
<?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
warply_android_sdk/src/main/res/drawable/shape_cos_white2.xml
0 → 100644
View file @
f6885cb
<?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
warply_android_sdk/src/main/res/layout/activity_loyalty.xml
View file @
f6885cb
...
...
@@ -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.Constraint
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/white"
android:paddingTop=
"48dp"
>
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: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=
"
48
dp"
android:paddingBottom=
"
24
dp"
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"
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"
android:layout_marginTop=
"24dp"
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"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
</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"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
0 → 100644
View file @
f6885cb
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/layout/cos_analysis.xml
View file @
f6885cb
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/layout/loyalty_analysis_container.xml
View file @
f6885cb
<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
<include
android:id=
"@+id/cl_chart_info"
layout=
"@layout/cos_analysis"
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_marginTop=
"32dp"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
...
...
warply_android_sdk/src/main/res/layout/tab_analysis.xml
View file @
f6885cb
...
...
@@ -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"
...
...
warply_android_sdk/src/main/res/values/colors.xml
View file @
f6885cb
...
...
@@ -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
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
f6885cb
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment