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
2025-01-14 14:19:00 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
36eca0243fa01145980f3518f0eb56375aecbb9c
36eca024
1 parent
b43f6b7e
ui changes for cosmote pass part1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
21 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyMarketAnalysisActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/MyRewardsFragment.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ExpiredCouponAdapter.java
warply_android_sdk/src/main/res/layout/activity_loyalty_market_analysis.xml
warply_android_sdk/src/main/res/layout/expired_coupon_layout_custom.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyMarketAnalysisActivity.java
View file @
36eca02
...
...
@@ -142,15 +142,15 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl
mSecondsHandler
.
postDelayed
(
this
,
1000
);
}
});
mSharedCoupons
.
clear
();
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
WarplyManager
.
getSharingHistory
(
new
WarplySharingHistoryRequest
()
.
setType
(
"supermarket"
)
,
mSharingHistoryCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
//
mSharedCoupons.clear();
//
new Thread(() -> {
//
if (!Thread.currentThread().isInterrupted()) {
//
WarplyManager.getSharingHistory(new WarplySharingHistoryRequest()
//
.setType("supermarket")
//
, mSharingHistoryCallback);
//
}
//
Thread.currentThread().interrupt();
//
}).start();
}
@Override
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/MyRewardsFragment.java
View file @
36eca02
...
...
@@ -484,7 +484,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
Handler
mUIHandler
=
new
Handler
(
Looper
.
getMainLooper
());
mUIHandler
.
post
(()
->
{
// if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0)
mTvUnifiedCountBadge
.
setText
(
String
.
valueOf
(
WarplyManagerHelper
.
getMarketCouponsList
().
size
()
+
WarplyManagerHelper
.
getSmCouponsList
().
size
()));
// mTvUnifiedCountBadge.setText(String.valueOf(WarplyManagerHelper.getMarketCouponsList().size() + WarplyManagerHelper.getSmCouponsList().size()));
mTvUnifiedCountBadge
.
setText
(
String
.
valueOf
(
1
));
// else
// mTvUnifiedCountBadge.setText("0");
// checkHistoryEmpty();
...
...
@@ -521,13 +522,14 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
mSortTileList
.
add
(
tileDeals
);
SortTileModel
tileUnified
=
new
SortTileModel
();
if
(
WarplyManagerHelper
.
getMarketCouponsList
()
!=
null
&&
WarplyManagerHelper
.
getMarketCouponsList
().
size
()
>
0
)
{
tileUnified
.
setCount
(
WarplyManagerHelper
.
getMarketCouponsList
().
size
());
// if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) {
// tileUnified.setCount(WarplyManagerHelper.getMarketCouponsList().size());
tileUnified
.
setCount
(
1
);
tileUnified
.
setWeight
(
2
);
}
else
{
tileUnified
.
setCount
(
0
);
tileUnified
.
setWeight
(
2
);
}
//
} else {
//
tileUnified.setCount(0);
//
tileUnified.setWeight(2);
//
}
if
(
WarplyManagerHelper
.
getSmCouponsList
()
!=
null
&&
WarplyManagerHelper
.
getSmCouponsList
().
size
()
>
0
)
{
int
smTileCount
=
tileUnified
.
getCount
();
tileUnified
.
setCount
(
smTileCount
+
WarplyManagerHelper
.
getSmCouponsList
().
size
());
...
...
@@ -696,7 +698,8 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
/** Unified Coupons List */
// if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0){
mTvUnifiedCountBadge
.
setText
(
String
.
valueOf
(
WarplyManagerHelper
.
getMarketCouponsList
().
size
()
+
WarplyManagerHelper
.
getSmCouponsList
().
size
()));
// mTvUnifiedCountBadge.setText(String.valueOf(WarplyManagerHelper.getMarketCouponsList().size() + WarplyManagerHelper.getSmCouponsList().size()));
mTvUnifiedCountBadge
.
setText
(
String
.
valueOf
(
1
));
// }else{
// mTvUnifiedCountBadge.setText("0");
// }
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ExpiredCouponAdapter.java
View file @
36eca02
package
ly
.
warp
.
sdk
.
views
.
adapters
;
import
android.content.Context
;
import
android.os.Build
;
import
android.text.Html
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -50,7 +52,7 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
}
public
class
ExpiredCouponViewHolder
extends
RecyclerView
.
ViewHolder
{
private
TextView
tvCouponTitle
,
tvCouponValue
,
tvCouponDate
,
tvCouponSubtitle
;
private
TextView
tvCouponTitle
,
tvCouponValue
,
tvCouponDate
,
tvCouponSubtitle
,
tvCouponsShop
;
private
ImageView
ivCouponLogo
;
public
ExpiredCouponViewHolder
(
View
view
)
{
...
...
@@ -60,9 +62,13 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
tvCouponDate
=
view
.
findViewById
(
R
.
id
.
tv_expired_coupons_date
);
ivCouponLogo
=
view
.
findViewById
(
R
.
id
.
iv_expired_logo
);
tvCouponSubtitle
=
view
.
findViewById
(
R
.
id
.
tv_expired_coupons_label
);
tvCouponsShop
=
view
.
findViewById
(
R
.
id
.
tv_expired_coupons_shop
);
WarpUtils
.
renderCustomFont
(
mContext
,
R
.
font
.
peridot_bold
,
tvCouponDate
,
tvCouponValue
);
WarpUtils
.
renderCustomFont
(
mContext
,
R
.
font
.
peridot_regular
,
tvCouponTitle
,
tvCouponSubtitle
);
if
(
mIsCustom
)
{
WarpUtils
.
renderCustomFont
(
mContext
,
R
.
font
.
peridot_semi_bold
,
tvCouponTitle
,
tvCouponsShop
);
}
}
}
...
...
@@ -89,7 +95,10 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
@Override
public
ExpiredCouponViewHolder
onCreateViewHolder
(
ViewGroup
parent
,
int
viewType
)
{
View
itemView
;
itemView
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
expired_coupon_layout
,
parent
,
false
);
if
(
mIsCustom
)
itemView
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
expired_coupon_layout_custom
,
parent
,
false
);
else
itemView
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
expired_coupon_layout
,
parent
,
false
);
return
new
ExpiredCouponViewHolder
(
itemView
);
}
...
...
@@ -100,6 +109,11 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
if
(
couponItem
!=
null
)
{
if
(
mIsCustom
)
{
holder
.
tvCouponTitle
.
setText
(
couponItem
.
getMerchantDetails
().
getAdminName
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
holder
.
tvCouponSubtitle
.
setText
(
Html
.
fromHtml
(
couponItem
.
getCouponsetDetails
().
getInnerText
(),
Html
.
FROM_HTML_MODE_COMPACT
));
}
else
{
holder
.
tvCouponSubtitle
.
setText
(
Html
.
fromHtml
(
couponItem
.
getCouponsetDetails
().
getInnerText
()));
}
if
(!
TextUtils
.
isEmpty
(
couponItem
.
getMerchantDetails
().
getImgPreview
()))
{
Glide
.
with
(
mContext
)
// .setDefaultRequestOptions(
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_market_analysis.xml
View file @
36eca02
...
...
@@ -46,7 +46,8 @@
android:gravity=
"center_horizontal"
android:paddingHorizontal=
"12dp"
android:paddingTop=
"12dp"
android:paddingBottom=
"8dp"
>
android:paddingBottom=
"8dp"
android:visibility=
"gone"
>
<include
android:id=
"@+id/cl_tab_coupon_analysis"
...
...
@@ -65,7 +66,8 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"20dp"
>
android:paddingBottom=
"20dp"
android:paddingTop=
"28dp"
>
<ImageView
android:id=
"@+id/iv_gift_circle_logo"
...
...
warply_android_sdk/src/main/res/layout/expired_coupon_layout_custom.xml
0 → 100644
View file @
36eca02
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"32dp"
>
<TextView
android:id=
"@+id/tv_expired_coupons_date"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/cos_light_black"
android:textSize=
"13sp"
tools:text=
"05/05/2022"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_expired_coupons_date"
android:layout_marginTop=
"8dp"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
<ImageView
android:id=
"@+id/iv_expired_logo"
android:layout_width=
"28dp"
android:layout_height=
"28dp"
tools:src=
"@drawable/ic_deals_circle"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"6dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_expired_coupons_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"2"
android:textColor=
"@color/cos_light_black"
android:textSize=
"16sp"
tools:text=
"Box"
/>
<LinearLayout
android:id=
"@+id/ll_expired_info_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:weightSum=
"1"
>
<TextView
android:id=
"@+id/tv_expired_coupons_label"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.8"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"@string/cos_expired_coupon_label"
android:textColor=
"@color/cos_light_black"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/tv_expired_coupons_value"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.2"
android:gravity=
"end"
android:textColor=
"@color/cos_light_black"
android:textSize=
"18sp"
tools:text=
"4$"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_expired_coupons_shop"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.8"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/cos_light_black"
android:textSize=
"15sp"
tools:text=
"@string/cos_expired_coupon_label"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
Please
register
or
login
to post a comment