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-06-22 19:29:04 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
58c27f74fb71d467b9e78ad64d1c418c30188bcb
58c27f74
1 parent
d954e112
changes for ios also
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
569 additions
and
395 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/WarpViewActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/ActiveDFYCouponModel.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/CouponEventModel.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltyGiftsForYouPackage.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/request/WarplyIntegrationRequest.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/src/main/res/drawable-xhdpi/ic_background_circle.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_background_circle_dark.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_circle.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_horizontal.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_polygon.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_gifts_polygon.png
warply_android_sdk/src/main/res/drawable/shape_cos_gradient6.xml
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
warply_android_sdk/src/main/res/layout/activity_more_for_you.xml
warply_android_sdk/src/main/res/values/strings.xml
warply_android_sdk/build.gradle
View file @
58c27f7
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta1
4
'
PUBLISH_VERSION
=
'4.5.4-cosbeta1
5
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
View file @
58c27f7
...
...
@@ -4,7 +4,6 @@ import android.app.Activity;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.graphics.Color
;
import
android.graphics.Paint
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
...
...
@@ -121,7 +120,11 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
// mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
mLlGiftIt
.
setOnClickListener
(
this
);
createBarcodeBitmap
(
mCoupon
.
getCoupon
());
String
tempCoupon
=
mCoupon
.
getCoupon
();
for
(
int
i
=
0
;
i
<
(
12
-
mCoupon
.
getCoupon
().
length
());
i
++)
{
tempCoupon
+=
"0"
;
}
createBarcodeBitmap
(
tempCoupon
);
}
private
void
createBarcodeBitmap
(
String
barcodeString
)
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
58c27f7
...
...
@@ -224,7 +224,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
}
private
ArrayList
<
MergedGifts
>
mergeDatasets
(
CampaignList
campaignList
,
CouponsetsList
couponsetsList
)
{
if
(
campaignList
.
size
()
>
0
)
{
if
(
campaignList
!=
null
&&
campaignList
.
size
()
>
0
)
{
for
(
Campaign
campaign
:
campaignList
)
{
MergedGifts
data
=
new
MergedGifts
();
data
.
setCampaign
(
campaign
);
...
...
@@ -234,7 +234,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
}
}
if
(
couponsetsList
.
size
()
>
0
)
{
if
(
couponsetsList
!=
null
&&
couponsetsList
.
size
()
>
0
)
{
for
(
Couponset
couponset
:
couponsetsList
)
{
MergedGifts
data
=
new
MergedGifts
();
data
.
setCampaign
(
null
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
58c27f7
...
...
@@ -10,11 +10,27 @@ import android.widget.LinearLayout;
import
android.widget.TextView
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
org.greenrobot.eventbus.EventBus
;
import
java.io.Serializable
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.concurrent.TimeUnit
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.io.models.ActiveDFYCouponModel
;
import
ly.warp.sdk.io.models.Coupon
;
import
ly.warp.sdk.io.models.CouponList
;
import
ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
import
ly.warp.sdk.views.adapters.ActiveCouponAdapter
;
public
class
LoyaltyWallet
extends
Activity
implements
View
.
OnClickListener
{
...
...
@@ -28,11 +44,16 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
// ===========================================================
private
ImageView
mIvBack
;
private
TextView
mTvUsername
,
mTvActiveCoupons
,
mTvActiveRewards
,
mTvUserBadge
;
private
ConstraintLayout
mClActiveCoupons
,
mClActiveRewards
,
mClActiveGifts
;
private
LinearLayout
mLlAnalysisButton
,
mLlQuestionnaire
,
mLlUserBadge
,
mLlPastCoupons
;
private
TextView
mTvUsername
,
mTvDealsValue
,
mTvDealsValueAll
,
mTvUserBadge
,
mTvGiftsValue
,
mTvGiftsValueAll
,
mTvActiveCode
,
mTvActiveDate
;
private
ConstraintLayout
mClDealsBanner
,
mClGiftsBanner
;
private
LinearLayout
mLlQuestionnaire
,
mLlUserBadge
;
float
couponValue
=
0.0f
,
couponDfyValue
=
0.0f
;
int
couponCount
=
0
;
private
RecyclerView
mRecyclerCoupons
;
private
ActiveCouponAdapter
mAdapterCoupons
;
CouponList
cpnlist
=
new
CouponList
();
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -44,13 +65,53 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
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
);
mLlQuestionnaire
=
findViewById
(
R
.
id
.
ll_user_questionnaire
);
mLlUserBadge
=
findViewById
(
R
.
id
.
ll_user_badge
);
mTvActiveRewards
=
findViewById
(
R
.
id
.
tv_active_deals_text
);
mTvUserBadge
=
findViewById
(
R
.
id
.
tv_type
);
mClActiveGifts
=
findViewById
(
R
.
id
.
cl_mygifts
);
mTvGiftsValue
=
findViewById
(
R
.
id
.
tv_gifts_value
);
mTvGiftsValueAll
=
findViewById
(
R
.
id
.
tv_gifts_value_all
);
mClDealsBanner
=
findViewById
(
R
.
id
.
cl_deals_cos
);
mClGiftsBanner
=
findViewById
(
R
.
id
.
cl_deals_win
);
mTvDealsValue
=
findViewById
(
R
.
id
.
tv_deals_value
);
mTvDealsValueAll
=
findViewById
(
R
.
id
.
tv_deals_value_all
);
mTvActiveCode
=
findViewById
(
R
.
id
.
tv_active_deals_text
);
mTvActiveDate
=
findViewById
(
R
.
id
.
tv_active_deals_date_text
);
if
(
WarplyManagerHelper
.
getActiveDFYCoupons
()
!=
null
)
{
Collections
.
sort
(
WarplyManagerHelper
.
getActiveDFYCoupons
(),
new
Comparator
<
ActiveDFYCouponModel
>()
{
public
int
compare
(
ActiveDFYCouponModel
o1
,
ActiveDFYCouponModel
o2
)
{
return
o1
.
getDate
().
compareTo
(
o2
.
getDate
());
}
});
for
(
ActiveDFYCouponModel
dfycoupon
:
WarplyManagerHelper
.
getActiveDFYCoupons
())
{
try
{
couponDfyValue
+=
Float
.
parseFloat
(
dfycoupon
.
getValue
());
}
catch
(
NumberFormatException
e
)
{
}
}
}
if
(
WarplyManagerHelper
.
getCouponList
()
!=
null
)
{
for
(
Coupon
coupon
:
WarplyManagerHelper
.
getCouponList
())
{
if
(
coupon
.
getStatus
()
==
1
)
{
try
{
cpnlist
.
add
(
coupon
);
couponCount
+=
1
;
couponValue
+=
Float
.
parseFloat
(
coupon
.
getDiscount
());
}
catch
(
NumberFormatException
e
)
{
cpnlist
.
remove
(
coupon
);
couponCount
-=
1
;
}
}
}
mRecyclerCoupons
=
findViewById
(
R
.
id
.
rv_active_coupons
);
mRecyclerCoupons
.
setNestedScrollingEnabled
(
false
);
mRecyclerCoupons
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
));
}
initViews
();
}
...
...
@@ -70,9 +131,14 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
LoyaltyWallet
.
this
,
WarplyManagerHelper
.
openQuestionnaire
()));
return
;
}
if
(
view
.
getId
()
==
R
.
id
.
cl_mygifts
)
{
Intent
intent
=
new
Intent
(
LoyaltyWallet
.
this
,
ActiveGiftsActivity
.
class
);
startActivity
(
intent
);
if
(
view
.
getId
()
==
R
.
id
.
cl_deals_cos
)
{
WarplyDealsAnalysisEventModel
warplyDealsAnalysisEventModel
=
new
WarplyDealsAnalysisEventModel
();
warplyDealsAnalysisEventModel
.
setPressed
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
warplyDealsAnalysisEventModel
));
return
;
}
if
(
view
.
getId
()
==
R
.
id
.
cl_deals_win
)
{
}
}
...
...
@@ -81,10 +147,37 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
// ===========================================================
private
void
initViews
()
{
CouponList
cpnlist
=
new
CouponList
();
for
(
Coupon
cpn
:
WarplyManagerHelper
.
getCouponList
())
{
if
(
cpn
.
getStatus
()
==
1
)
cpnlist
.
add
(
cpn
);
mAdapterCoupons
=
new
ActiveCouponAdapter
(
this
,
cpnlist
);
mRecyclerCoupons
.
setAdapter
(
mAdapterCoupons
);
mAdapterCoupons
.
getPositionClicks
()
.
doOnNext
(
coupon
->
{
Intent
intent
=
new
Intent
(
LoyaltyWallet
.
this
,
CouponInfoActivity
.
class
);
intent
.
putExtra
(
"coupon"
,
(
Serializable
)
coupon
);
startActivity
(
intent
);
})
.
doOnError
(
error
->
{
})
.
subscribe
();
mTvGiftsValue
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_value
),
String
.
valueOf
(
couponValue
)));
mTvGiftsValueAll
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_deals_win_title
),
String
.
valueOf
(
couponValue
),
String
.
valueOf
(
couponCount
)));
mTvDealsValue
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_value
),
String
.
valueOf
(
couponDfyValue
)));
mTvDealsValueAll
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_deals_win_title_cos
),
String
.
valueOf
(
couponDfyValue
)));
if
(
WarplyManagerHelper
.
getActiveDFYCoupons
()
!=
null
&&
WarplyManagerHelper
.
getActiveDFYCoupons
().
size
()
>
0
)
{
mTvActiveCode
.
setText
(
WarplyManagerHelper
.
getActiveDFYCoupons
().
get
(
0
).
getCode
());
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd hh:mm"
);
String
date1
=
WarplyManagerHelper
.
getActiveDFYCoupons
().
get
(
0
).
getDate
();
String
date2
=
dateFormat
.
format
(
new
Date
());
try
{
Date
toDate
=
dateFormat
.
parse
(
date2
);
Date
fromDate
=
dateFormat
.
parse
(
date1
);
long
diff
=
TimeUnit
.
MILLISECONDS
.
toDays
(
fromDate
.
getTime
()
-
toDate
.
getTime
());
mTvActiveDate
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_active_coupon_date
),
String
.
valueOf
(
diff
)));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
if
(
WarplyManagerHelper
.
getConsumer
()
!=
null
)
{
...
...
@@ -102,12 +195,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
}
mIvBack
.
setOnClickListener
(
this
);
// mTvAnalysisButton.setOnClickListener(this);
mLlQuestionnaire
.
setOnClickListener
(
this
);
//TODO: change the parameter, for testing purposes only
mTvActiveRewards
.
setText
(
String
.
format
(
getResources
().
getString
(
R
.
string
.
cos_active_rewards
),
String
.
valueOf
(
cpnlist
.
size
())));
mClActiveGifts
.
setOnClickListener
(
this
);
mLlUserBadge
.
setOnClickListener
(
this
);
mClDealsBanner
.
setOnClickListener
(
this
);
mClGiftsBanner
.
setOnClickListener
(
this
);
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/WarpViewActivity.java
View file @
58c27f7
...
...
@@ -127,6 +127,8 @@ public class WarpViewActivity extends WarpBaseActivity {
EventBus
.
getDefault
().
unregister
(
this
);
if
(
event
.
getQuestionnaire
()
!=
null
)
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
event
.
getQuestionnaire
()));
if
(
event
.
getCoupon
()
!=
null
)
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
event
.
getCoupon
()));
finish
();
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/ActiveDFYCouponModel.java
0 → 100644
View file @
58c27f7
/*
* Copyright 2010-2013 Warply Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package
ly
.
warp
.
sdk
.
io
.
models
;
/**
* Created by Panagiotis Triantafyllou on 22-June-22.
*/
public
class
ActiveDFYCouponModel
{
private
String
value
;
private
String
date
;
private
String
code
;
public
ActiveDFYCouponModel
()
{
this
.
value
=
""
;
this
.
date
=
""
;
this
.
code
=
""
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/CouponEventModel.java
0 → 100644
View file @
58c27f7
/*
* Copyright 2010-2013 Warply Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package
ly
.
warp
.
sdk
.
io
.
models
;
/**
* Created by Panagiotis Triantafyllou on 21-June-22.
*/
public
class
CouponEventModel
{
private
boolean
success
;
public
CouponEventModel
()
{
this
.
success
=
false
;
}
public
boolean
isSuccess
()
{
return
success
;
}
public
void
setSuccess
(
boolean
success
)
{
this
.
success
=
success
;
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltyGiftsForYouPackage.java
0 → 100644
View file @
58c27f7
package
ly
.
warp
.
sdk
.
io
.
models
;
/**
* Created by Panagiotis Triantafyllou on 22/Ιουν/2022.
*/
public
class
LoyaltyGiftsForYouPackage
{
private
String
title
;
private
String
imageUrl
;
private
String
loyaltyPackageId
;
public
LoyaltyGiftsForYouPackage
()
{
this
.
title
=
""
;
this
.
imageUrl
=
""
;
this
.
loyaltyPackageId
=
""
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getImageUrl
()
{
return
imageUrl
;
}
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
public
String
getLoyaltyPackageId
()
{
return
loyaltyPackageId
;
}
public
void
setLoyaltyPackageId
(
String
loyaltyPackageId
)
{
this
.
loyaltyPackageId
=
loyaltyPackageId
;
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/io/request/WarplyIntegrationRequest.java
View file @
58c27f7
...
...
@@ -12,7 +12,6 @@ import java.security.NoSuchAlgorithmException;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.constants.WarpConstants
;
/**
...
...
@@ -29,6 +28,8 @@ public class WarplyIntegrationRequest {
private
final
String
KEY_ACTION
=
"action"
;
private
final
String
KEY_ACTION_VALUE
=
"integration"
;
private
final
String
KEY_DATA
=
"data"
;
private
final
String
KEY_METHOD
=
"method"
;
private
final
String
KEY_METHOD_VALUE
=
"consumer_extra_data"
;
// ===========================================================
// Fields
...
...
@@ -143,12 +144,16 @@ public class WarplyIntegrationRequest {
try
{
JSONObject
extraJson
=
new
JSONObject
();
extraJson
.
putOpt
(
KEY_ACTION
,
KEY_ACTION_VALUE
);
extraJson
.
putOpt
(
KEY_METHOD
,
KEY_METHOD_VALUE
);
ArrayList
list
=
new
ArrayList
();
list
.
add
(
"6982853746"
);
list
.
add
(
"6982853747"
);
list
.
add
(
"6982853748"
);
JSONObject
data
=
new
JSONObject
();
data
.
putOpt
(
"nonTelco"
,
WarplyManagerHelper
.
loadCustomerState
().
isNonTelco
()
);
data
.
putOpt
(
"acceptedConsent"
,
WarplyManagerHelper
.
loadCustomerState
().
isAcceptedConsent
()
);
data
.
putOpt
(
"msisdnList"
,
new
JSONArray
(
WarplyManagerHelper
.
loadCustomerState
().
getMsisdnList
()
));
data
.
putOpt
(
"guid"
,
WarplyManagerHelper
.
loadCustomerState
().
getGuid
()
);
data
.
putOpt
(
"nonTelco"
,
false
);
data
.
putOpt
(
"acceptedConsent"
,
true
);
data
.
putOpt
(
"msisdnList"
,
new
JSONArray
(
list
));
data
.
putOpt
(
"guid"
,
"12345678"
);
extraJson
.
putOpt
(
KEY_DATA
,
data
);
bodyJsonObject
.
putOpt
(
KEY_MAPP
,
extraJson
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
58c27f7
...
...
@@ -25,11 +25,16 @@
package
ly
.
warp
.
sdk
.
utils
;
import
android.util.Log
;
import
org.json.JSONObject
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.db.WarplyDBHelper
;
import
ly.warp.sdk.io.models.ActiveDFYCouponModel
;
import
ly.warp.sdk.io.models.Campaign
;
import
ly.warp.sdk.io.models.CampaignList
;
import
ly.warp.sdk.io.models.Consumer
;
...
...
@@ -37,6 +42,7 @@ import ly.warp.sdk.io.models.CouponList;
import
ly.warp.sdk.io.models.CouponsetsList
;
import
ly.warp.sdk.io.models.CustomerStateModel
;
import
ly.warp.sdk.io.models.LoyaltyContextualOfferModel
;
import
ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage
;
/**
* Created by Panagiotis Triantafyllou on 18-Apr-22.
...
...
@@ -58,6 +64,9 @@ public class WarplyManagerHelper {
private
static
CouponsetsList
mCouponsetsList
=
new
CouponsetsList
();
private
static
CustomerStateModel
mCustomerStateModel
;
private
static
CampaignList
mCampaignList
;
private
static
ArrayList
<
ActiveDFYCouponModel
>
mDfyCoupons
=
new
ArrayList
();
private
static
ArrayList
<
LoyaltyGiftsForYouPackage
>
mSeasonalList
=
new
ArrayList
<>();
private
static
ArrayList
<
LoyaltyContextualOfferModel
>
mCCMSList
=
new
ArrayList
<>();
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -93,43 +102,68 @@ public class WarplyManagerHelper {
/**
* Open Warply campaign with sharing id
*/
public
static
String
constructCampaignUrlForShare
(
String
sessionUuid
,
String
sharingId
)
{
if
(
getCampaignList
()
!=
null
)
{
for
(
Campaign
item
:
getCampaignList
())
{
if
(
item
.
getSessionUUID
().
equals
(
sessionUuid
))
{
String
url
=
item
.
getIndexUrl
()
+
"?web_id="
+
WarpUtils
.
getWebId
(
Warply
.
getWarplyContext
())
+
"&app_uuid="
+
WarplyProperty
.
getAppUuid
(
Warply
.
getWarplyContext
())
+
"&api_key="
+
WarpUtils
.
getApiKey
(
Warply
.
getWarplyContext
())
+
"&session_uuid="
+
item
.
getSessionUUID
()
+
"&access_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"access_token"
)
+
"&refresh_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"refresh_token"
)
+
"&client_id="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_id"
)
+
"&client_secret="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_secret"
)
+
"&sharing_id="
+
sharingId
;
return
url
;
public
static
void
constructCampaignUrlForShare
(
String
sharingId
)
{
// if (getCampaignList() != null) {
// for (Campaign item : getCampaignList()) {
// if (item.getSessionUUID().equals(sessionUuid)) {
// String url = item.getIndexUrl()
// + "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext())
// + "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext())
// + "&api_key=" + WarpUtils.getApiKey(Warply.getWarplyContext())
// + "&session_uuid=" + item.getSessionUUID()
// + "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")
// + "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")
// + "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")
// + "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret")
// + "&sharing_id=" + sharingId;
// return url;
// }
// }
// }
//
// return "";
}
/**
* Open CCMS campaign
*/
public
static
String
constructCcmsUrl
(
LoyaltyContextualOfferModel
item
)
{
return
/*url*/
""
;
}
private
void
mergeCCMS
()
{
}
return
""
;
/**
* Set the List with CCMS Campaigns
*/
public
static
void
setCCMSLoyaltyCampaigns
(
ArrayList
<
LoyaltyContextualOfferModel
>
list
)
{
mCCMSList
=
list
;
if
(
mUniqueCampaignList
!=
null
&&
mUniqueCampaignList
.
get
(
"gifts_for_you"
)
!=
null
&&
mUniqueCampaignList
.
get
(
"gifts_for_you"
).
size
()
>
0
)
{
for
(
Campaign
camp
:
mUniqueCampaignList
.
get
(
"gifts_for_you"
))
{
try
{
String
te2
=
WarpJSONParser
.
getJSONFromString
(
camp
.
getExtraFields
()).
keys
().
next
();
}
catch
(
Exception
exception
)
{
Log
.
v
(
"WarplyManagerHelper_CCMS"
,
exception
.
toString
());
}
}
}
}
/**
*
Open CCMS campaign
*
Save the LoyaltyGiftsForYouPackage list
*/
public
static
String
constructCcmsUrl
(
LoyaltyContextualOfferModel
item
)
{
return
/*url*/
""
;
public
static
void
setSeasonalList
(
ArrayList
<
LoyaltyGiftsForYouPackage
>
seasonalCoupons
)
{
mSeasonalList
=
seasonalCoupons
;
}
// public static CampaignList mergeCCMS(ArrayList<LoyaltyContextualOfferModel> ccmslist, CampaignList clist) {
// CampaignList mergedList = clist;
// for (LoyaltyContextualOfferModel element : ccmslist) {
//
// }
//
// return mergedList;
// }
/**
* Get the LoyaltyGiftsForYouPackage list
*/
public
static
ArrayList
<
LoyaltyGiftsForYouPackage
>
getSeasonalList
()
{
return
mSeasonalList
;
}
/**
* Open Questionnaire
...
...
@@ -172,22 +206,15 @@ public class WarplyManagerHelper {
/**
* Set the List with active D4Y coupons
*/
public
static
void
setActiveDFYCoupons
(
ArrayList
<
String
>
code
s
)
{
public
static
void
setActiveDFYCoupons
(
ArrayList
<
ActiveDFYCouponModel
>
dfyCoupon
s
)
{
mDfyCoupons
=
dfyCoupons
;
}
/**
* Get the List with active D4Y coupons
*/
public
static
ArrayList
<
String
>
getActiveDFYCoupons
()
{
return
new
ArrayList
<>();
}
/**
* Set the List with CCMS Campaigns
*/
public
static
void
setCCMSLoyaltyCampaigns
(
ArrayList
<
LoyaltyContextualOfferModel
>
list
)
{
//TODO: create
public
static
ArrayList
<
ActiveDFYCouponModel
>
getActiveDFYCoupons
()
{
return
mDfyCoupons
;
}
public
static
Consumer
getConsumer
()
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
View file @
58c27f7
...
...
@@ -2,6 +2,7 @@ package ly.warp.sdk.utils.managers;
import
java.util.HashMap
;
import
ly.warp.sdk.io.models.CouponEventModel
;
import
ly.warp.sdk.io.models.LoyaltyContextualOfferModel
;
import
ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent
;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
...
...
@@ -25,6 +26,7 @@ public class WarplyEventBusManager {
private
WarplyCCMSEnabledModel
ccmsActivated
;
private
LoyaltyGiftsForYouOfferClickEvent
giftsYou
;
private
QuestionnaireEventModel
questionnaire
;
private
CouponEventModel
coupon
;
public
WarplyEventBusManager
()
{
...
...
@@ -38,6 +40,10 @@ public class WarplyEventBusManager {
this
.
questionnaire
=
questionnaire
;
}
public
WarplyEventBusManager
(
CouponEventModel
coupon
)
{
this
.
coupon
=
coupon
;
}
public
WarplyEventBusManager
(
LoyaltySDKFirebaseEventModel
fireEvent
)
{
this
.
fireEvent
=
fireEvent
;
}
...
...
@@ -127,4 +133,8 @@ public class WarplyEventBusManager {
public
QuestionnaireEventModel
getQuestionnaire
()
{
return
questionnaire
;
}
public
CouponEventModel
getCoupon
()
{
return
coupon
;
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
58c27f7
...
...
@@ -62,6 +62,7 @@ import java.util.LinkedHashMap;
import
java.util.Map
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.io.models.CouponEventModel
;
import
ly.warp.sdk.io.models.QuestionnaireEventModel
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyProperty
;
...
...
@@ -382,6 +383,10 @@ public class WarpView extends WebView {
questionnaireEvent
.
setParameter
(
parts
[
2
]);
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
parts
[
2
]);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
else
if
(
parts
[
1
].
equals
(
"event:couponRetrieved"
))
{
CouponEventModel
couponEvent
=
new
CouponEventModel
();
couponEvent
.
setSuccess
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
couponEvent
));
}
}
}
...
...
warply_android_sdk/src/main/res/drawable-xhdpi/ic_background_circle.png
0 → 100644
View file @
58c27f7
4.02 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_background_circle_dark.png
0 → 100644
View file @
58c27f7
16.7 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_circle.png
0 → 100644
View file @
58c27f7
38.7 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_horizontal.png
0 → 100644
View file @
58c27f7
28.4 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_deals_polygon.png
0 → 100644
View file @
58c27f7
15.3 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_gifts_polygon.png
0 → 100644
View file @
58c27f7
12.5 KB
warply_android_sdk/src/main/res/drawable/shape_cos_gradient6.xml
View file @
58c27f7
...
...
@@ -6,5 +6,5 @@
android:endColor=
"@color/cos_skyblue"
android:type=
"linear"
/>
<corners
android:radius=
"
12
dp"
/>
android:radius=
"
7
dp"
/>
</shape>
\ No newline at end of file
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
View file @
58c27f7
...
...
@@ -34,51 +34,93 @@
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_header"
<!-- <ScrollView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_below="@+id/cl_header"-->
<!-- android:fillViewport="true">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@drawable/shape_cos_loyalty"-->
<!-- android:orientation="vertical"-->
<!-- android:paddingBottom="24dp">-->
<!-- <ImageView-->
<!-- android:id="@+id/iv_deals_logo_new"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/cl_deals_win"-->
<!-- android:layout_marginStart="12dp"-->
<!-- android:layout_marginTop="48dp"-->
<!-- android:src="@drawable/ic_deals_logo_new" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_mygifts_title"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@+id/cl_loyalty_deals"-->
<!-- android:layout_marginStart="12dp"-->
<!-- android:layout_marginTop="48dp"-->
<!-- android:text="@string/cos_mygifts"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textFontWeight="600"-->
<!-- android:textSize="18sp" />-->
<!-- </RelativeLayout>-->
<!-- </ScrollView>-->
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"
90dp
"
android:layout_height=
"
match_parent
"
android:layout_below=
"@+id/cl_loyalty_wallet_header"
android:layout_marginBottom=
"24dp"
android:background=
"@android:color/white"
android:paddingHorizontal=
"24dp"
>
android:background=
"@color/cos_grey5"
android:fillViewport=
"true"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/ll_first_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/ic_background_circle"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:paddingVertical=
"32dp"
>
<de.hdodenhof.circleimageview.CircleImageView
android:id=
"@+id/iv_profile_photo"
android:layout_width=
"6
0dp"
android:layout_height=
"6
0dp"
android:layout_width=
"7
0dp"
android:layout_height=
"7
0dp"
android:src=
"@drawable/profile_photo"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"@+id/iv_profile_photo"
app:layout_constraintStart_toEndOf=
"@+id/iv_profile_photo"
app:layout_constraintTop_toTopOf=
"@+id/iv_profile_photo"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginBottom=
"4dp"
android:layout_marginVertical=
"6dp"
android:maxLines=
"1"
android:textColor=
"@color/grey"
android:textSize=
"15sp"
tools:text=
"Test Name"
/>
<LinearLayout
android:id=
"@+id/ll_user_badge"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:background=
"@drawable/shape_cos_gradient6"
android:gravity=
"center"
android:paddingHorizontal=
"6
dp"
android:paddingVertical=
"2
dp"
android:paddingHorizontal=
"10
dp"
android:paddingVertical=
"3
dp"
android:visibility=
"gone"
tools:visibility=
"visible"
>
...
...
@@ -95,8 +137,6 @@
android:id=
"@+id/ll_user_questionnaire"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:background=
"@drawable/shape_cos_transparent_rounded3"
android:gravity=
"center"
android:paddingHorizontal=
"8dp"
android:paddingVertical=
"4dp"
...
...
@@ -111,20 +151,91 @@
android:textFontWeight=
"600"
/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<ScrollView
<LinearLayout
android:id=
"@+id/ll_second_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/cl_header"
android:fillViewport=
"true"
>
android:layout_below=
"@+id/ll_first_view"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_deals_cos"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_cos_loyalty"
android:layout_marginHorizontal=
"8dp"
android:layout_marginTop=
"32dp"
>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_vertical_06_cos"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.09"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_horizontal_50_cos"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.56"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_deals_win_inner_cos"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:background=
"@drawable/shape_cos_grey4"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/gl_vertical_06_cos"
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_vertical_16_cos"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:paddingBottom=
"24dp"
>
app:layout_constraintGuide_percent=
"0.16"
/>
<TextView
android:id=
"@+id/tv_deals_value_all"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:text=
"@string/cos_deals_win_title_cos"
android:textColor=
"@android:color/white"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_16_cos"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id=
"@+id/iv_deals_logo"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_marginVertical=
"4dp"
android:src=
"@drawable/ic_deals_polygon"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/gl_vertical_06_cos"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_06_cos"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_deals_value"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/cos_grey"
android:textSize=
"12sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"@+id/iv_deals_logo"
app:layout_constraintStart_toStartOf=
"@+id/iv_deals_logo"
app:layout_constraintTop_toBottomOf=
"@+id/gl_horizontal_50_cos"
tools:text=
"18.00€"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_deals_win"
...
...
@@ -138,7 +249,14 @@
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.074"
/>
app:layout_constraintGuide_percent=
"0.09"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_horizontal_50"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.56"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_deals_win_inner"
...
...
@@ -158,12 +276,13 @@
app:layout_constraintGuide_percent=
"0.16"
/>
<TextView
android:id=
"@+id/tv_gifts_value_all"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:text=
"@string/cos_deals_win_title"
android:textColor=
"@android:color/white"
android:textSize=
"15
sp"
android:textSize=
"16
sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_16"
...
...
@@ -171,32 +290,44 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:id=
"@+id/iv_gifts_logo"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_marginVertical=
"4dp"
android:src=
"@drawable/ic_hands
"
android:src=
"@drawable/ic_gifts_polygon
"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/gl_vertical_06"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_06"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_gifts_value"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/cos_grey"
android:textSize=
"12sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"@+id/iv_gifts_logo"
app:layout_constraintStart_toStartOf=
"@+id/iv_gifts_logo"
app:layout_constraintTop_toBottomOf=
"@+id/gl_horizontal_50"
tools:text=
"20.00€"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id=
"@+id/iv_deals_logo_new"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/cl_deals_win"
android:layout_marginStart=
"12dp"
android:layout_width=
"110dp"
android:layout_height=
"40dp"
android:layout_gravity=
"start"
android:layout_marginHorizontal=
"16dp"
android:layout_marginTop=
"48dp"
android:src=
"@drawable/ic_deals_logo_new
"
/>
android:src=
"@drawable/ic_deals_horizontal
"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_loyalty_deal
s"
android:id=
"@+id/cl_mygift
s"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/iv_deals_logo_new
"
android:layout_marginHorizontal=
"6
dp"
android:layout_below=
"@+id/tv_mygifts_title
"
android:layout_marginHorizontal=
"8
dp"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/shape_cos_white2"
android:paddingVertical=
"10dp"
>
...
...
@@ -211,7 +342,7 @@
app:layout_constraintTop_toTopOf=
"parent"
>
<TextView
android:id=
"@+id/tv_active_deal
s"
android:id=
"@+id/tv_active_gift
s"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/cos_active_deals"
...
...
@@ -220,311 +351,52 @@
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/tv_active_deals_code
"
android:id=
"@+id/tv_active_deals_text
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"961544809"
android:textColor=
"@color/blue_dark"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
tools:text=
"961544809"
/>
<TextView
android:id=
"@+id/tv_active_deals_date_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Λήγει σε 4 ημέρες"
android:textColor=
"@color/blue_dark"
android:textFontWeight=
"600"
/>
tools:text=
"@string/cos_active_coupon_date"
android:textColor=
"@color/blue_dark"
/>
</LinearLayout>
<ImageView
android:layout_width=
"90dp"
android:layout_height=
"90dp"
android:layout_width=
"86dp"
android:layout_height=
"86dp"
android:layout_marginVertical=
"4dp"
android:layout_marginEnd=
"32dp"
android:src=
"@drawable/ic_deals_green
"
android:src=
"@drawable/ic_deals_circle
"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id=
"@+id/tv_mygifts_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/cl_loyalty_deals
"
android:layout_marginStart=
"12
dp"
android:layout_gravity=
"start
"
android:layout_marginHorizontal=
"16
dp"
android:layout_marginTop=
"48dp"
android:layout_marginBottom=
"10dp"
android:text=
"@string/cos_mygifts"
android:textColor=
"@android:color/white"
android:textFontWeight=
"600"
android:textSize=
"18sp"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_mygifts"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_mygifts_title"
android:layout_marginHorizontal=
"6dp"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/shape_cos_white2"
android:paddingVertical=
"10dp"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"24dp"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<TextView
android:id=
"@+id/tv_active_gifts"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/cos_gifts_banner_title"
android:textColor=
"@color/blue_dark"
android:textFontWeight=
"600"
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/tv_active_deals_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/cos_active_rewards"
android:textColor=
"@color/blue_dark"
android:textSize=
"18sp"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_active_coupons"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/cos_see_more
"
android:textColor=
"@color/blue_dark
"
/>
android:layout_marginHorizontal=
"2dp
"
android:paddingBottom=
"40dp
"
/>
</LinearLayout>
<!-- <ImageView-->
<!-- android:layout_width="90dp"-->
<!-- android:layout_height="90dp"-->
<!-- android:layout_marginEnd="32dp"-->
<!-- android:src="@drawable/ic_deals_green"-->
<!-- 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/cl_active_coupons"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@+id/cl_loyalty_deals"-->
<!-- android:layout_marginTop="64dp"-->
<!-- android:paddingBottom="4dp">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_coupons_title"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="10dp"-->
<!-- android:text="@string/cos_loyalty_coupons"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <LinearLayout-->
<!-- android:id="@+id/ll_old_coupons"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:orientation="horizontal"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/tv_coupons_title"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@+id/tv_coupons_title">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:text="@string/cos_loyalty_old_coupons"-->
<!-- android:textColor="@color/white_tr4"-->
<!-- android:textFontWeight="600"-->
<!-- android:textSize="16sp" />-->
<!-- <ImageView-->
<!-- android:id="@+id/iv_more"-->
<!-- android:layout_width="20dp"-->
<!-- android:layout_height="20dp"-->
<!-- android:layout_marginEnd="24dp"-->
<!-- android:src="@drawable/ic_arrow_right_white" />-->
<!-- </LinearLayout>-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/cl_loyalty_coupon"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="140dp"-->
<!-- android:layout_marginTop="16dp"-->
<!-- android:background="@drawable/ic_coupon_background"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_coupons_title">-->
<!-- <LinearLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="40dp"-->
<!-- android:orientation="vertical"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_active_coupons"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginBottom="8dp"-->
<!-- android:textColor="@color/blue_dark"-->
<!-- android:textFontWeight="600"-->
<!-- android:textSize="18sp"-->
<!-- tools:text="@string/cos_active_coupons" />-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:text="@string/cos_see_all"-->
<!-- android:textColor="@color/blue_dark" />-->
<!-- </LinearLayout>-->
<!-- <ImageView-->
<!-- android:layout_width="90dp"-->
<!-- android:layout_height="90dp"-->
<!-- android:layout_marginEnd="32dp"-->
<!-- android:src="@drawable/ic_gifts_for_you"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/cl_cl_active_rewards"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@+id/cl_active_coupons"-->
<!-- android:layout_marginTop="64dp"-->
<!-- android:paddingBottom="4dp">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_rewards_title"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="10dp"-->
<!-- android:text="@string/cos_loyalty_rewards"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <LinearLayout-->
<!-- android:id="@+id/ll_old_rewards"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:orientation="horizontal"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/tv_rewards_title"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@+id/tv_rewards_title">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:text="@string/cos_loyalty_old_rewards"-->
<!-- android:textColor="@color/white_tr4"-->
<!-- android:textFontWeight="600"-->
<!-- android:textSize="16sp" />-->
<!-- <ImageView-->
<!-- android:id="@+id/iv_more2"-->
<!-- android:layout_width="20dp"-->
<!-- android:layout_height="20dp"-->
<!-- android:layout_marginEnd="24dp"-->
<!-- android:src="@drawable/ic_arrow_right_white" />-->
<!-- </LinearLayout>-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/cl_loyalty_rewards"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="160dp"-->
<!-- android:layout_marginHorizontal="6dp"-->
<!-- android:layout_marginTop="16dp"-->
<!-- android:background="@drawable/shape_cos_white2"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_rewards_title">-->
<!-- <LinearLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="38dp"-->
<!-- android:orientation="vertical"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_active_rewards"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginBottom="8dp"-->
<!-- android:textColor="@color/blue_dark"-->
<!-- android:textFontWeight="600"-->
<!-- android:textSize="18sp"-->
<!-- tools:text="@string/cos_active_rewards" />-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:text="@string/cos_see_all"-->
<!-- android:textColor="@color/blue_dark" />-->
<!-- </LinearLayout>-->
<!-- <ImageView-->
<!-- android:layout_width="90dp"-->
<!-- android:layout_height="90dp"-->
<!-- android:layout_marginEnd="32dp"-->
<!-- android:src="@drawable/ic_loyalty_rewards"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- <LinearLayout-->
<!-- android:id="@+id/ll_analysis"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_below="@+id/cl_cl_active_rewards"-->
<!-- android:layout_marginHorizontal="32dp"-->
<!-- android:layout_marginTop="64dp"-->
<!-- android:layout_marginBottom="32dp"-->
<!-- android:background="@drawable/selector_button_grey"-->
<!-- android:gravity="center"-->
<!-- android:orientation="horizontal"-->
<!-- android:visibility="gone">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:text="@string/cos_analysis"-->
<!-- android:textColor="@color/cos_green6"-->
<!-- android:textSize="17dp"-->
<!-- android:textStyle="bold" />-->
<!-- </LinearLayout>-->
</RelativeLayout>
</ScrollView>
</RelativeLayout>
...
...
warply_android_sdk/src/main/res/layout/activity_more_for_you.xml
View file @
58c27f7
...
...
@@ -95,9 +95,10 @@
android:layout_height=
"match_parent"
android:layout_below=
"@+id/ll_more_popup"
android:layout_marginHorizontal=
"16dp"
android:layout_marginTop=
"4
8
dp"
android:layout_marginTop=
"4dp"
android:clipToPadding=
"false"
android:orientation=
"vertical"
android:paddingTop=
"44dp"
android:paddingBottom=
"24dp"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
58c27f7
...
...
@@ -11,7 +11,7 @@
<string
name=
"cos_profile_type"
>
Traveller
</string>
<string
name=
"header_add"
>
Προσθήκη
</string>
<string
name=
"cos_profile_reward"
>
My Loyalty\nWallet
</string>
<string
name=
"cos_profile_title"
>
My loyalty wallet
</string>
<string
name=
"cos_profile_title"
>
For You
</string>
<string
name=
"cos_deals_title"
>
Deals for You
</string>
<string
name=
"cos_profile_more"
>
Δες περισσότερα
</string>
<string
name=
"cos_gifts_title"
>
GIFTS for YOU
</string>
...
...
@@ -67,12 +67,14 @@
<string
name=
"cos_gift_it"
>
Κάντο δώρο!
</string>
<string
name=
"cos_popup_more_title"
>
COSMOTE MORE FOR YOU
</string>
<string
name=
"cos_popup_more_subtitle"
>
Εδώ μπορείς να βρεις διαγωνισμούς και\nνα σε επιβραβεύσουμε για τις αθλητικές σου\nδραστηριότητες!
</string>
<string
name=
"cos_deals_win_title"
>
Μέχρι τώρα έχεις κερδίσει 30 κουπόνια\nκαι 20,00€ σε προσφορές!
</string>
<string
name=
"cos_deals_win_title"
>
Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!
</string>
<string
name=
"cos_deals_win_title_cos"
>
Μέχρι τώρα έχεις κερδίσει %1$s€ με το DEALS for YOU!
</string>
<string
name=
"cos_mygifts"
>
Τα δώρα μου
</string>
<string
name=
"cos_gifts_banner_title"
>
Δώρα:
</string>
<string
name=
"cos_see_more"
>
Δες περισσότερα
</string>
<string
name=
"cos_active_gifts_title"
>
Ενεργά δώρα
</string>
<string
name=
"cos_loyalty_analysis"
>
Ανάλυση συναλλαγών
</string>
<string
name=
"cos_value"
>
%1$s€
</string>
<string-array
name=
"coupons_array"
>
<item>
Κουπόνια
</item>
...
...
Please
register
or
login
to post a comment