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
2023-04-13 12:30:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3369e245c8a9defbfdcba21248e3bf70af387bb3
3369e245
1 parent
e1cfdcd2
redesign part3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
20 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/views/DividerView.java
warply_android_sdk/src/main/res/layout/active_coupon_layout.xml
warply_android_sdk/src/main/res/layout/activity_loyalty_analysis.xml
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
warply_android_sdk/src/main/res/layout/expired_coupon_layout.xml
warply_android_sdk/src/main/res/layout/shared_coupon_layout.xml
warply_android_sdk/src/main/res/values/attrs.xml
warply_android_sdk/src/main/res/values/strings.xml
warply_android_sdk/src/main/java/ly/warp/sdk/views/DividerView.java
0 → 100644
View file @
3369e24
package
ly
.
warp
.
sdk
.
views
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.graphics.Canvas
;
import
android.graphics.DashPathEffect
;
import
android.graphics.Paint
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
ly.warp.sdk.R
;
/**
* Created by Panagiotis Triantafyllou on 13/Απρ/2023.
* @ https://stackoverflow.com/questions/20583298/creating-horizontal-and-vertical-dotted-lines-in-android
*/
public
class
DividerView
extends
View
{
static
public
int
ORIENTATION_HORIZONTAL
=
0
;
static
public
int
ORIENTATION_VERTICAL
=
1
;
private
Paint
mPaint
;
private
int
orientation
;
public
DividerView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
int
dashGap
,
dashLength
,
dashThickness
;
int
color
;
TypedArray
a
=
context
.
getTheme
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
DividerView
,
0
,
0
);
try
{
dashGap
=
a
.
getDimensionPixelSize
(
R
.
styleable
.
DividerView_dashGap
,
5
);
dashLength
=
a
.
getDimensionPixelSize
(
R
.
styleable
.
DividerView_dashLength
,
5
);
dashThickness
=
a
.
getDimensionPixelSize
(
R
.
styleable
.
DividerView_dashThickness
,
3
);
color
=
a
.
getColor
(
R
.
styleable
.
DividerView_color
,
0xff000000
);
orientation
=
a
.
getInt
(
R
.
styleable
.
DividerView_orientation
,
ORIENTATION_HORIZONTAL
);
}
finally
{
a
.
recycle
();
}
mPaint
=
new
Paint
();
mPaint
.
setAntiAlias
(
true
);
mPaint
.
setColor
(
color
);
mPaint
.
setStyle
(
Paint
.
Style
.
STROKE
);
mPaint
.
setStrokeWidth
(
dashThickness
);
mPaint
.
setPathEffect
(
new
DashPathEffect
(
new
float
[]{
dashLength
,
dashGap
,},
0
));
}
public
DividerView
(
Context
context
)
{
this
(
context
,
null
);
}
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
if
(
orientation
==
ORIENTATION_HORIZONTAL
)
{
float
center
=
getHeight
()
*
.
5
f
;
canvas
.
drawLine
(
0
,
center
,
getWidth
(),
center
,
mPaint
);
}
else
{
float
center
=
getWidth
()
*
.
5
f
;
canvas
.
drawLine
(
center
,
0
,
center
,
getHeight
(),
mPaint
);
}
}
}
\ No newline at end of file
warply_android_sdk/src/main/res/layout/active_coupon_layout.xml
View file @
3369e24
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:custom=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:layout_marginVertical=
"6dp"
android:layout_marginHorizontal=
"4dp"
android:layout_marginVertical=
"6dp"
android:background=
"@drawable/ic_coupon_background_new2"
>
<androidx.constraintlayout.widget.Guideline
...
...
@@ -25,16 +26,21 @@
app:layout_constraintTop_toTopOf=
"parent"
tools:src=
"@drawable/ic_gifts_for_you"
/>
<View
<
ly.warp.sdk.views.Divider
View
android:id=
"@+id/v_separator"
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:layout_height=
"0dp"
android:layerType=
"software"
android:layout_marginVertical=
"16dp"
android:layout_marginStart=
"16dp"
android:background=
"@drawable/shape_dashed_vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/iv_active_coupon"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
custom:color=
"@color/cos_gray"
custom:dashGap=
"10dp"
custom:dashLength=
"10dp"
custom:dashThickness=
"1dp"
custom:orientation=
"vertical"
/>
<LinearLayout
android:id=
"@+id/ll_coupon_info"
...
...
@@ -49,41 +55,41 @@
<TextView
android:id=
"@+id/tv_active_coupons_title"
fontPath=
"fonts/BTCosmo-Bold.ttf"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/cos_light_black"
fontPath=
"fonts/BTCosmo-Bold.ttf"
android:textSize=
"16sp"
tools:text=
"Εκπτωτικο κουπονι 10$ για αγορες στα ΙΚΕΑ"
/>
<TextView
android:id=
"@+id/tv_active_coupons_value"
fontPath=
"fonts/BTCosmo-Bold.ttf"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/cos_light_black"
android:textSize=
"42sp"
fontPath=
"fonts/BTCosmo-Bold.ttf"
tools:text=
"10$"
/>
<TextView
android:id=
"@+id/tv_active_coupons_date"
fontPath=
"fonts/PeridotPE-Regular.ttf"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/cos_gray"
fontPath=
"fonts/PeridotPE-Regular.ttf"
android:textSize=
"12sp"
tools:text=
"@string/cos_active_coupon_date"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_active_coupons_description"
fontPath=
"fonts/PeridotPE-Regular.ttf"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginEnd=
"32dp"
fontPath=
"fonts/PeridotPE-Regular.ttf"
android:maxLines=
"4"
android:textColor=
"@color/cos_gray"
android:textSize=
"12sp"
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_analysis.xml
View file @
3369e24
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
View file @
3369e24
...
...
@@ -82,7 +82,7 @@
<LinearLayout
android:id=
"@+id/ll_user_badge"
android:layout_width=
"
180dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"42dp"
android:background=
"@drawable/selector_button_green_border"
android:gravity=
"center"
...
...
@@ -97,7 +97,8 @@
android:includeFontPadding=
"false"
android:textColor=
"@color/cos_green12"
android:textSize=
"16sp"
tools:text=
"@string/cos_profile_type"
/>
android:layout_marginHorizontal=
"20dp"
tools:text=
"@string/cos_profile_preferences_placeholder"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -179,7 +180,7 @@
android:includeFontPadding=
"false"
android:text=
"@string/cos_deals_win_title_cos"
android:textColor=
"@color/cos_light_black"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_16_cos"
...
...
@@ -188,8 +189,8 @@
<ImageView
android:id=
"@+id/iv_deals_logo"
android:layout_width=
"
80
dp"
android:layout_height=
"
80
dp"
android:layout_width=
"
76
dp"
android:layout_height=
"
76
dp"
android:layout_marginVertical=
"4dp"
android:src=
"@drawable/ic_deals_polygon_new"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
@@ -258,7 +259,7 @@
android:includeFontPadding=
"false"
android:text=
"@string/cos_deals_win_title"
android:textColor=
"@color/cos_light_black"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/gl_vertical_16"
...
...
@@ -267,8 +268,8 @@
<ImageView
android:id=
"@+id/iv_gifts_logo"
android:layout_width=
"
80
dp"
android:layout_height=
"
80
dp"
android:layout_width=
"
76
dp"
android:layout_height=
"
76
dp"
android:layout_marginVertical=
"4dp"
android:src=
"@drawable/ic_gifts_polygon_new"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
@@ -301,7 +302,7 @@
<ImageView
android:id=
"@+id/dfy_logo"
android:layout_width=
"2
2
0dp"
android:layout_width=
"2
0
0dp"
android:layout_height=
"30dp"
android:layout_gravity=
"start"
android:layout_marginHorizontal=
"16dp"
...
...
warply_android_sdk/src/main/res/layout/expired_coupon_layout.xml
View file @
3369e24
...
...
@@ -48,7 +48,7 @@
android:layout_weight=
"0.5"
android:maxLines=
"2"
android:textColor=
"@color/cos_light_black"
android:textSize=
"1
8
sp"
android:textSize=
"1
6
sp"
tools:text=
"Box"
/>
<TextView
...
...
warply_android_sdk/src/main/res/layout/shared_coupon_layout.xml
View file @
3369e24
...
...
@@ -48,7 +48,7 @@
android:layout_weight=
"0.5"
android:maxLines=
"2"
android:textColor=
"@color/cos_light_black"
android:textSize=
"1
8
sp"
android:textSize=
"1
6
sp"
tools:text=
"Box"
/>
<TextView
...
...
warply_android_sdk/src/main/res/values/attrs.xml
0 → 100644
View file @
3369e24
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable
name=
"DividerView"
>
<attr
name=
"color"
format=
"color"
/>
<attr
name=
"dashLength"
format=
"dimension"
/>
<attr
name=
"dashGap"
format=
"dimension"
/>
<attr
name=
"dashThickness"
format=
"dimension"
/>
<attr
name=
"orientation"
format=
"enum"
>
<enum
name=
"horizontal"
value=
"0"
/>
<enum
name=
"vertical"
value=
"1"
/>
</attr>
</declare-styleable>
</resources>
\ No newline at end of file
warply_android_sdk/src/main/res/values/strings.xml
View file @
3369e24
...
...
@@ -149,6 +149,7 @@
<string
name=
"cos_dlg_no_map"
>
Το πρόγραμμα Χάρτες Petal λείπει.
</string>
<string
name=
"cos_dlg_no_shops_title"
>
Καταστήματα συνεργάτη
</string>
<string
name=
"cos_dlg_no_shops_positive"
>
Δες το eshop
</string>
<string
name=
"cos_profile_preferences_placeholder"
>
Οι προτιμήσεις μου
</string>
<string-array
name=
"coupons_array"
>
<item>
Κουπόνια
</item>
...
...
Please
register
or
login
to post a comment