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
2026-03-12 15:58:00 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6661597b9458786592d862dc305a4faec1984353
6661597b
1 parent
3f167525
redesign part2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
15 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/SingleCouponsetActivity.java
warply_android_sdk/src/main/res/drawable-xhdpi/demo_tick_green.png
warply_android_sdk/src/main/res/drawable/shape_rectangle_rounded_light_green.xml
warply_android_sdk/src/main/res/layout/activity_single_couponset.xml
warply_android_sdk/src/main/res/values/colors.xml
warply_android_sdk/src/main/res/values/strings.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/SingleCouponsetActivity.java
View file @
6661597
...
...
@@ -49,7 +49,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
private
TextView
mTvValue
;
private
TextView
mTvMoreButton
;
private
ImageView
mIvImage
;
private
LinearLayout
mRedeemButton
;
private
LinearLayout
mRedeemButton
,
mSuccessButton
;
private
boolean
mIsDescriptionExpanded
=
false
;
private
RelativeLayout
mPbLoading
;
// Terms of Use section
...
...
@@ -59,7 +59,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
private
ImageView
mIvTermsArrow
;
private
TextView
mTvTermsText
;
private
boolean
mIsTermsExpanded
=
false
;
private
TextView
mTvTermsTitle
,
mTvRedeemTitle
,
mTvMerchantName
;
private
TextView
mTvTermsTitle
,
mTvRedeemTitle
,
mTvMerchantName
,
mTvSuccessRedeemTitle
;
// ===========================================================
...
...
@@ -114,6 +115,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
mRedeemButton
=
findViewById
(
R
.
id
.
ll_redeem_coupon
);
mRedeemButton
.
setOnClickListener
(
this
);
mSuccessButton
=
findViewById
(
R
.
id
.
ll_success_redeem
);
// Initialize views
mTvSmallDescription
=
findViewById
(
R
.
id
.
tv_coupon_small_description
);
mTvFullDescription
=
findViewById
(
R
.
id
.
tv_coupon_full_description
);
...
...
@@ -132,13 +135,14 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
mTvTermsTitle
=
findViewById
(
R
.
id
.
tv_terms_title
);
mTvRedeemTitle
=
findViewById
(
R
.
id
.
tv_redeem_title
);
mTvSuccessRedeemTitle
=
findViewById
(
R
.
id
.
tv_success_redeem_title
);
WarpUtils
.
renderCustomFont
(
this
,
R
.
font
.
ping_lcg_bold
,
mTvValue
,
mTvTermsTitle
,
mTvMoreButton
,
mTvMerchantName
,
mTvEndDate
);
WarpUtils
.
renderCustomFont
(
this
,
R
.
font
.
ping_lcg_regular
,
mTvSmallDescription
,
mTvFullDescription
,
mTvTermsText
,
mTvRedeemTitle
);
mTvFullDescription
,
mTvTermsText
,
mTvRedeemTitle
,
mTvSuccessRedeemTitle
);
if
(
mOfferItem
!=
null
)
{
if
(
mOfferItem
.
getEndDate
()
!=
null
&&
!
mOfferItem
.
getEndDate
().
isEmpty
())
{
...
...
@@ -274,13 +278,16 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
public
void
onSuccess
(
JSONObject
result
)
{
mPbLoading
.
setVisibility
(
View
.
GONE
);
Toast
.
makeText
(
SingleCouponsetActivity
.
this
,
"RETRIEVE SUCCESS"
,
Toast
.
LENGTH_SHORT
).
show
();
Coupon
coupon
=
new
Coupon
();
coupon
.
setCoupon
(
result
.
optString
(
"coupon"
,
""
));
coupon
.
setExpiration
(
result
.
optString
(
"expiration"
,
""
));
coupon
.
setCouponsetDetails
(
mOfferItem
);
Intent
myIntent
=
new
Intent
(
SingleCouponsetActivity
.
this
,
SingleCouponActivity
.
class
);
myIntent
.
putExtra
(
SingleCouponActivity
.
EXTRA_OFFER_ITEM
,
(
Parcelable
)
coupon
);
startActivity
(
myIntent
);
// Coupon coupon = new Coupon();
// coupon.setCoupon(result.optString("coupon", ""));
// coupon.setExpiration(result.optString("expiration", ""));
// coupon.setCouponsetDetails(mOfferItem);
// Intent myIntent = new Intent(SingleCouponsetActivity.this, SingleCouponActivity.class);
// myIntent.putExtra(SingleCouponActivity.EXTRA_OFFER_ITEM, (Parcelable) coupon);
// startActivity(myIntent);
mRedeemButton
.
setVisibility
(
View
.
GONE
);
mSuccessButton
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
...
...
warply_android_sdk/src/main/res/drawable-xhdpi/demo_tick_green.png
0 → 100644
View file @
6661597
1.85 KB
warply_android_sdk/src/main/res/drawable/shape_rectangle_rounded_light_green.xml
0 → 100644
View file @
6661597
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"1000dp"
/>
<solid
android:width=
"2dp"
android:color=
"@color/custom_light_green"
/>
</shape>
\ No newline at end of file
warply_android_sdk/src/main/res/layout/activity_single_couponset.xml
View file @
6661597
...
...
@@ -177,18 +177,46 @@
android:id=
"@+id/tv_redeem_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/demo_redeem"
android:includeFontPadding=
"false"
android:text=
"@string/demo_redeem"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_success_redeem"
android:layout_width=
"match_parent"
android:layout_height=
"55dp"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/shape_rectangle_rounded_light_green"
android:gravity=
"center"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<ImageView
android:layout_width=
"18dp"
android:layout_height=
"18dp"
android:src=
"@drawable/demo_tick_green"
/>
<View
android:layout_width=
"12dp"
android:layout_height=
"match_parent"
/>
<TextView
android:id=
"@+id/tv_success_redeem_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:text=
"@string/demo_success_redeem"
android:textColor=
"@color/custom_green"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/terms_container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
32
dp"
android:layout_marginTop=
"
28
dp"
android:orientation=
"vertical"
android:paddingHorizontal=
"2dp"
>
...
...
@@ -196,8 +224,8 @@
android:id=
"@+id/terms_header"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_gravity=
"center"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
warply_android_sdk/src/main/res/values/colors.xml
View file @
6661597
...
...
@@ -30,4 +30,6 @@
<color
name=
"custom_black7"
>
#002430
</color>
<color
name=
"custom_skyblue4"
>
#DDEFFB
</color>
<color
name=
"custom_skyblue5"
>
#CCE9FB
</color>
<color
name=
"custom_green"
>
#0D9E5B
</color>
<color
name=
"custom_light_green"
>
#DBF6E6
</color>
</resources>
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
6661597
...
...
@@ -22,6 +22,7 @@
<string
name=
"demo_shops"
>
Καταστήματα κοντά μου
</string>
<string
name=
"demo_website"
>
Δες το website
</string>
<string
name=
"demo_redeem"
>
Get coupon
</string>
<string
name=
"demo_success_redeem"
>
Saved to My Coupons
</string>
<string
name=
"demo_profile"
>
Το προφίλ μου
</string>
<string
name=
"demo_my_coupons"
>
Τα κουπόνια μου
</string>
<string
name=
"demo_active"
>
Ενεργά
</string>
...
...
Please
register
or
login
to post a comment