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
2024-02-07 18:20:29 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9b0e61d81e76dc6a17990a0c858976d4abdff443
9b0e61d8
1 parent
1c9f321a
eurobank demo screens
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
669 additions
and
3 deletions
app/src/main/assets/warply.properties
warply_android_sdk/build.gradle
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/EurobankHomeActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/CampainsFragment.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/MapFragment.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/constants/WarpConstants.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ActiveCampaignsAdapter.java
warply_android_sdk/src/main/res/drawable-xhdpi/epistrofi_logo_white.png
warply_android_sdk/src/main/res/drawable-xhdpi/list.png
warply_android_sdk/src/main/res/drawable-xhdpi/map.png
warply_android_sdk/src/main/res/drawable-xhdpi/map_pin.png
warply_android_sdk/src/main/res/drawable-xhdpi/offer_circle_orange.png
warply_android_sdk/src/main/res/drawable/background_bottom_border.xml
warply_android_sdk/src/main/res/drawable/background_rounded_corners.xml
warply_android_sdk/src/main/res/drawable/background_rounded_corners_red.xml
warply_android_sdk/src/main/res/layout/active_campaign_layout.xml
warply_android_sdk/src/main/res/layout/activity_eurobank_home.xml
warply_android_sdk/src/main/res/layout/fragment_campaigns.xml
warply_android_sdk/src/main/res/layout/fragment_map.xml
warply_android_sdk/src/main/res/values/colors.xml
warply_android_sdk/src/main/res/values/strings.xml
app/src/main/assets/warply.properties
View file @
9b0e61d
...
...
@@ -35,7 +35,7 @@ PushIcon=ic_notify
SendPackages
=
false
# The app language
#
Language=el
Language
=
el
# The merchant id for some requests
MerchantId
=
59949
...
...
warply_android_sdk/build.gradle
View file @
9b0e61d
...
...
@@ -53,6 +53,7 @@ dependencies {
api
'org.altbeacon:android-beacon-library:2.19.3'
api
'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
api
"commons-logging:commons-logging:1.2"
api
group:
'io.reactivex.rxjava2'
,
name:
'rxjava'
,
version:
'2.2.21'
//------------------------------ Firebase -----------------------------//
api
platform
(
'com.google.firebase:firebase-bom:32.0.0'
)
...
...
@@ -61,6 +62,8 @@ dependencies {
//------------------------------ GMS -----------------------------//
api
'com.google.android.gms:play-services-base:18.2.0'
api
'com.google.android.gms:play-services-location:21.0.1'
implementation
'com.google.android.gms:play-services-maps:18.2.0'
implementation
'com.google.maps.android:android-maps-utils:3.8.2'
//------------------------------ Work Manager -----------------------------//
api
'androidx.work:work-runtime:2.8.1'
...
...
warply_android_sdk/src/main/AndroidManifest.xml
View file @
9b0e61d
...
...
@@ -16,6 +16,10 @@
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<application>
<meta-data
android:name=
"com.google.android.geo.API_KEY"
android:value=
"AIzaSyB-K6OiUDT_X0zp2jYjqHg54ThxEuZtr9I"
/>
<!-- For Huawei Push -->
<meta-data
android:name=
"push_kit_auto_init_enabled"
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/EurobankHomeActivity.java
View file @
9b0e61d
package
ly
.
warp
.
sdk
.
activities
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.fragments.CampainsFragment
;
import
ly.warp.sdk.fragments.MapFragment
;
public
class
EurobankHomeActivity
extends
WarpBaseActivity
{
public
class
EurobankHomeActivity
extends
FragmentActivity
implements
View
.
OnClickListener
{
// ===========================================================
// Constants
...
...
@@ -14,6 +21,9 @@ public class EurobankHomeActivity extends WarpBaseActivity {
// Fields
// ===========================================================
private
Fragment
mFragmentToSet
=
null
;
private
LinearLayout
mLlList
,
mLlMap
;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
...
...
@@ -22,6 +32,12 @@ public class EurobankHomeActivity extends WarpBaseActivity {
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_eurobank_home
);
mLlList
=
findViewById
(
R
.
id
.
ll_filter_list
);
mLlMap
=
findViewById
(
R
.
id
.
ll_filter_map
);
mLlList
.
setOnClickListener
(
this
);
mLlMap
.
setOnClickListener
(
this
);
initViews
();
}
...
...
@@ -31,8 +47,36 @@ public class EurobankHomeActivity extends WarpBaseActivity {
}
private
void
initViews
()
{
mLlList
.
setVisibility
(
View
.
VISIBLE
);
mLlMap
.
setVisibility
(
View
.
GONE
);
mFragmentToSet
=
CampainsFragment
.
newInstance
();
getSupportFragmentManager
().
beginTransaction
().
add
(
R
.
id
.
fl_fragment
,
mFragmentToSet
).
commit
();
}
@Override
public
void
onClick
(
View
view
)
{
if
(
view
.
getId
()
==
R
.
id
.
ll_filter_list
)
{
mLlList
.
setVisibility
(
View
.
GONE
);
mLlMap
.
setVisibility
(
View
.
VISIBLE
);
mFragmentToSet
=
MapFragment
.
newInstance
();
getSupportFragmentManager
().
beginTransaction
()
.
replace
(
R
.
id
.
fl_fragment
,
mFragmentToSet
)
.
addToBackStack
(
null
)
.
commit
();
return
;
}
if
(
view
.
getId
()
==
R
.
id
.
ll_filter_map
)
{
mLlList
.
setVisibility
(
View
.
VISIBLE
);
mLlMap
.
setVisibility
(
View
.
GONE
);
mFragmentToSet
=
CampainsFragment
.
newInstance
();
getSupportFragmentManager
().
beginTransaction
()
.
replace
(
R
.
id
.
fl_fragment
,
mFragmentToSet
)
.
addToBackStack
(
null
)
.
commit
();
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/CampainsFragment.java
0 → 100644
View file @
9b0e61d
package
ly
.
warp
.
sdk
.
fragments
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.fragment.app.Fragment
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.activities.WarpViewActivity
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.views.adapters.ActiveCampaignsAdapter
;
public
class
CampainsFragment
extends
Fragment
{
public
static
Fragment
newInstance
()
{
CampainsFragment
campaignsFragment
=
new
CampainsFragment
();
return
campaignsFragment
;
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
return
inflater
.
inflate
(
R
.
layout
.
fragment_campaigns
,
container
,
false
);
}
public
void
onViewCreated
(
@NonNull
View
view
,
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
RecyclerView
mRecyclerCampaigns
=
view
.
findViewById
(
R
.
id
.
rv_active_campaigns
);
mRecyclerCampaigns
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
(),
LinearLayoutManager
.
VERTICAL
,
false
));
ActiveCampaignsAdapter
mAdapterCampaigns
=
new
ActiveCampaignsAdapter
(
getContext
(),
WarplyManagerHelper
.
getCampaignList
());
mRecyclerCampaigns
.
setAdapter
(
mAdapterCampaigns
);
mAdapterCampaigns
.
getPositionClicks
()
.
doOnNext
(
campaignItem
->
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
getContext
(),
campaignItem
.
getIndexUrl
()));
})
.
doOnError
(
error
->
{
})
.
subscribe
();
}
@Override
public
void
onDestroyView
()
{
super
.
onDestroyView
();
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/MapFragment.java
0 → 100644
View file @
9b0e61d
package
ly
.
warp
.
sdk
.
fragments
;
import
android.graphics.Bitmap
;
import
android.graphics.Canvas
;
import
android.graphics.drawable.Drawable
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.core.content.ContextCompat
;
import
androidx.fragment.app.Fragment
;
import
com.google.android.gms.maps.CameraUpdate
;
import
com.google.android.gms.maps.CameraUpdateFactory
;
import
com.google.android.gms.maps.GoogleMap
;
import
com.google.android.gms.maps.OnMapReadyCallback
;
import
com.google.android.gms.maps.SupportMapFragment
;
import
com.google.android.gms.maps.model.BitmapDescriptor
;
import
com.google.android.gms.maps.model.BitmapDescriptorFactory
;
import
com.google.android.gms.maps.model.LatLng
;
import
com.google.android.gms.maps.model.MarkerOptions
;
import
com.google.android.gms.maps.model.VisibleRegion
;
import
java.util.ArrayList
;
import
java.util.Random
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.utils.constants.WarpConstants
;
public
class
MapFragment
extends
Fragment
implements
OnMapReadyCallback
,
GoogleMap
.
OnMapLoadedCallback
,
GoogleMap
.
OnCameraIdleListener
{
public
final
static
float
DEFAULT_LOCATION_ZOOM
=
6.2f
;
private
static
final
double
MIN_LATITUDE
=
34.75261
;
private
static
final
double
MAX_LATITUDE
=
41.97761
;
private
static
final
double
MIN_LONGITUDE
=
19.33079
;
private
static
final
double
MAX_LONGITUDE
=
28.62522
;
private
SupportMapFragment
mMapView
;
private
GoogleMap
mMap
;
public
static
Fragment
newInstance
()
{
MapFragment
mapFragment
=
new
MapFragment
();
return
mapFragment
;
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
return
inflater
.
inflate
(
R
.
layout
.
fragment_map
,
container
,
false
);
}
public
void
onViewCreated
(
@NonNull
View
view
,
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
mMapView
=
(
SupportMapFragment
)
getChildFragmentManager
().
findFragmentById
(
R
.
id
.
mv_shops
);
mMapView
.
getMapAsync
(
this
);
}
@Override
public
void
onDestroyView
()
{
super
.
onDestroyView
();
}
@Override
public
void
onMapReady
(
@NonNull
GoogleMap
googleMap
)
{
mMap
=
googleMap
;
mMap
.
setMapType
(
GoogleMap
.
MAP_TYPE_NORMAL
);
mMap
.
setMinZoomPreference
(
DEFAULT_LOCATION_ZOOM
);
mMap
.
setLatLngBoundsForCameraTarget
(
WarpConstants
.
GREECE_BOUNDS
);
mMap
.
getUiSettings
().
setZoomControlsEnabled
(
true
);
mMap
.
getUiSettings
().
setZoomGesturesEnabled
(
true
);
mMap
.
getUiSettings
().
setCompassEnabled
(
false
);
mMap
.
getUiSettings
().
setMyLocationButtonEnabled
(
false
);
mMap
.
getUiSettings
().
setMapToolbarEnabled
(
false
);
mMap
.
getUiSettings
().
setTiltGesturesEnabled
(
false
);
mMap
.
getUiSettings
().
setRotateGesturesEnabled
(
false
);
mMap
.
setOnMapLoadedCallback
(
this
);
mMap
.
setOnCameraIdleListener
(
this
);
}
@Override
public
void
onMapLoaded
()
{
if
(
mMap
!=
null
)
{
CameraUpdate
camUpdate
;
camUpdate
=
CameraUpdateFactory
.
newLatLngBounds
(
WarpConstants
.
GREECE_BOUNDS
,
48
);
mMap
.
animateCamera
(
camUpdate
);
ArrayList
<
LatLng
>
generatedLatLngList
=
generateRandomLatLng
(
10
);
addCustomMarkersToMap
(
generatedLatLngList
);
}
}
@Override
public
void
onCameraIdle
()
{
// Get the current visible region on the map
VisibleRegion
visibleRegion
=
mMap
.
getProjection
().
getVisibleRegion
();
// Generate new random LatLng points based on the visible region
ArrayList
<
LatLng
>
generatedLatLngList
=
generateRandomLatLng
(
10
,
visibleRegion
);
// Clear existing markers on the map
mMap
.
clear
();
// Add new markers to the map
addCustomMarkersToMap
(
generatedLatLngList
);
}
private
void
addCustomMarkersToMap
(
ArrayList
<
LatLng
>
generatedLatLngList
)
{
BitmapDescriptor
customMarkerIcon
=
getBitmapDescriptorFromDrawable
(
ContextCompat
.
getDrawable
(
getContext
(),
R
.
drawable
.
map_pin
));
for
(
LatLng
pin
:
generatedLatLngList
)
{
mMap
.
addMarker
(
new
MarkerOptions
()
.
position
(
pin
)
.
anchor
(
0.5f
,
0.5f
)
.
title
(
getString
(
R
.
string
.
eurobank_pin_name
))
.
icon
(
customMarkerIcon
)
.
snippet
(
String
.
valueOf
(
Math
.
random
())));
}
}
private
ArrayList
<
LatLng
>
generateRandomLatLng
(
int
count
)
{
ArrayList
<
LatLng
>
latLngList
=
new
ArrayList
<>();
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
double
latitude
=
MIN_LATITUDE
+
(
MAX_LATITUDE
-
MIN_LATITUDE
)
*
random
.
nextDouble
();
double
longitude
=
MIN_LONGITUDE
+
(
MAX_LONGITUDE
-
MIN_LONGITUDE
)
*
random
.
nextDouble
();
latLngList
.
add
(
new
LatLng
(
latitude
,
longitude
));
}
return
latLngList
;
}
private
ArrayList
<
LatLng
>
generateRandomLatLng
(
int
count
,
VisibleRegion
visibleRegion
)
{
ArrayList
<
LatLng
>
latLngList
=
new
ArrayList
<>();
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
double
latitude
=
visibleRegion
.
latLngBounds
.
southwest
.
latitude
+
(
visibleRegion
.
latLngBounds
.
northeast
.
latitude
-
visibleRegion
.
latLngBounds
.
southwest
.
latitude
)
*
random
.
nextDouble
();
double
longitude
=
visibleRegion
.
latLngBounds
.
southwest
.
longitude
+
(
visibleRegion
.
latLngBounds
.
northeast
.
longitude
-
visibleRegion
.
latLngBounds
.
southwest
.
longitude
)
*
random
.
nextDouble
();
latLngList
.
add
(
new
LatLng
(
latitude
,
longitude
));
}
return
latLngList
;
}
private
BitmapDescriptor
getBitmapDescriptorFromDrawable
(
Drawable
drawable
)
{
Canvas
canvas
=
new
Canvas
();
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
160
,
140
,
Bitmap
.
Config
.
ARGB_8888
);
canvas
.
setBitmap
(
bitmap
);
drawable
.
setBounds
(
0
,
0
,
160
,
140
);
drawable
.
draw
(
canvas
);
return
BitmapDescriptorFactory
.
fromBitmap
(
bitmap
);
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/utils/constants/WarpConstants.java
View file @
9b0e61d
...
...
@@ -25,6 +25,9 @@
package
ly
.
warp
.
sdk
.
utils
.
constants
;
import
com.google.android.gms.maps.model.LatLng
;
import
com.google.android.gms.maps.model.LatLngBounds
;
public
class
WarpConstants
{
/**
...
...
@@ -32,6 +35,12 @@ public class WarpConstants {
*/
public
static
final
String
SDK_VERSION
=
"4.5.5.4"
;
public
static
final
LatLngBounds
GREECE_BOUNDS
=
new
LatLngBounds
(
new
LatLng
(
34.75261
,
19.33079
),
new
LatLng
(
41.97761
,
28.62522
)
);
/**
* The URL of the server where it should ping
*/
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ActiveCampaignsAdapter.java
0 → 100644
View file @
9b0e61d
package
ly
.
warp
.
sdk
.
views
.
adapters
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
java.util.ArrayList
;
import
io.reactivex.Observable
;
import
io.reactivex.subjects.PublishSubject
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.io.models.Campaign
;
public
class
ActiveCampaignsAdapter
extends
RecyclerView
.
Adapter
<
ActiveCampaignsAdapter
.
ActiveCampaignsViewHolder
>
{
private
Context
mContext
;
private
ArrayList
<
Campaign
>
mCampaigns
;
private
final
PublishSubject
<
Campaign
>
onClickSubject
=
PublishSubject
.
create
();
public
ActiveCampaignsAdapter
(
Context
mContext
,
ArrayList
<
Campaign
>
campaignList
)
{
this
.
mContext
=
mContext
;
this
.
mCampaigns
=
campaignList
;
}
public
class
ActiveCampaignsViewHolder
extends
RecyclerView
.
ViewHolder
{
private
ImageView
mIvCampaignImage
;
private
TextView
mTvCampaignTitle
,
mTvCampaignSubtitle
;
public
ActiveCampaignsViewHolder
(
View
view
)
{
super
(
view
);
mIvCampaignImage
=
view
.
findViewById
(
R
.
id
.
iv_campaign_image
);
mTvCampaignTitle
=
view
.
findViewById
(
R
.
id
.
tv_campaign_title
);
mTvCampaignSubtitle
=
view
.
findViewById
(
R
.
id
.
tv_campaign_subtitle
);
}
}
@Override
public
int
getItemCount
()
{
if
(
mCampaigns
==
null
)
return
0
;
else
return
mCampaigns
.
size
();
}
public
Campaign
getItem
(
int
id
)
{
return
mCampaigns
.
get
(
id
);
}
public
void
updateData
(
ArrayList
<
Campaign
>
campaignList
)
{
mCampaigns
.
clear
();
mCampaigns
.
addAll
(
campaignList
);
notifyDataSetChanged
();
}
@Override
public
ActiveCampaignsViewHolder
onCreateViewHolder
(
ViewGroup
parent
,
int
viewType
)
{
View
itemView
;
itemView
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
active_campaign_layout
,
parent
,
false
);
return
new
ActiveCampaignsViewHolder
(
itemView
);
}
@Override
public
void
onBindViewHolder
(
final
ActiveCampaignsViewHolder
holder
,
int
position
)
{
Campaign
campaignItem
=
mCampaigns
.
get
(
position
);
holder
.
mTvCampaignTitle
.
setText
(
campaignItem
.
getTitle
());
holder
.
mTvCampaignSubtitle
.
setText
(
campaignItem
.
getSubtitle
());
if
(!
TextUtils
.
isEmpty
(
campaignItem
.
getLogoUrl
()))
{
Glide
.
with
(
mContext
)
.
load
(
campaignItem
.
getLogoUrl
())
.
diskCacheStrategy
(
DiskCacheStrategy
.
DATA
)
.
into
(
holder
.
mIvCampaignImage
);
}
holder
.
itemView
.
setOnClickListener
(
v
->
onClickSubject
.
onNext
(
campaignItem
));
}
public
Observable
<
Campaign
>
getPositionClicks
()
{
return
onClickSubject
.
cache
();
}
}
warply_android_sdk/src/main/res/drawable-xhdpi/epistrofi_logo_white.png
0 → 100644
View file @
9b0e61d
18.6 KB
warply_android_sdk/src/main/res/drawable-xhdpi/list.png
0 → 100644
View file @
9b0e61d
1.28 KB
warply_android_sdk/src/main/res/drawable-xhdpi/map.png
0 → 100644
View file @
9b0e61d
3.11 KB
warply_android_sdk/src/main/res/drawable-xhdpi/map_pin.png
0 → 100644
View file @
9b0e61d
15.3 KB
warply_android_sdk/src/main/res/drawable-xhdpi/offer_circle_orange.png
0 → 100644
View file @
9b0e61d
82.7 KB
warply_android_sdk/src/main/res/drawable/background_bottom_border.xml
0 → 100644
View file @
9b0e61d
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/red2"
/>
<!-- border color -->
</shape>
</item>
<item
android:bottom=
"4dp"
>
<!-- adjust borders width here -->
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#FFFFFF"
/>
<!-- background color -->
</shape>
</item>
</layer-list>
\ No newline at end of file
warply_android_sdk/src/main/res/drawable/background_rounded_corners.xml
0 → 100644
View file @
9b0e61d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@android:color/white"
/>
<corners
android:radius=
"5dp"
/>
<padding
android:bottom=
"0dp"
android:left=
"0dp"
android:right=
"0dp"
android:top=
"0dp"
/>
</shape>
\ No newline at end of file
warply_android_sdk/src/main/res/drawable/background_rounded_corners_red.xml
0 → 100644
View file @
9b0e61d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/red2"
/>
<corners
android:radius=
"23dp"
/>
<padding
android:bottom=
"0dp"
android:left=
"0dp"
android:right=
"0dp"
android:top=
"0dp"
/>
</shape>
\ No newline at end of file
warply_android_sdk/src/main/res/layout/active_campaign_layout.xml
0 → 100644
View file @
9b0e61d
<?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:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"260dp"
android:background=
"@drawable/background_rounded_corners"
android:clipToOutline=
"true"
android:layout_marginBottom=
"16dp"
>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_horizontal_84_percent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.84"
/>
<ImageView
android:id=
"@+id/iv_campaign_image"
android:layout_width=
"match_parent"
android:layout_height=
"170dp"
android:scaleType=
"centerCrop"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:background=
"@android:color/white"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/iv_campaign_image"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/white"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
android:paddingHorizontal=
"24dp"
>
<TextView
android:id=
"@+id/tv_campaign_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"2dp"
android:maxLines=
"2"
android:textStyle=
"bold"
tools:text=
"Test Title"
/>
<TextView
android:id=
"@+id/tv_campaign_subtitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:maxLines=
"2"
tools:text=
"Test Subtitle"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"100dp"
android:layout_height=
"90dp"
app:layout_constraintBottom_toTopOf=
"@+id/gl_horizontal_84_percent"
app:layout_constraintEnd_toEndOf=
"parent"
>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_horizontal_26_percent_inner"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.26"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_horizontal_76_percent_inner"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.76"
/>
<ImageView
android:layout_width=
"100dp"
android:layout_height=
"90dp"
android:src=
"@drawable/offer_circle_orange"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:src=
"@drawable/epistrofi_logo_white"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/gl_horizontal_26_percent_inner"
/>
<TextView
android:id=
"@+id/tv_campaign_value"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"2dp"
android:maxLines=
"1"
android:textStyle=
"bold"
android:textColor=
"@android:color/white"
app:layout_constraintBottom_toTopOf=
"@+id/gl_horizontal_76_percent_inner"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
android:text=
"10%"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
warply_android_sdk/src/main/res/layout/activity_eurobank_home.xml
View file @
9b0e61d
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/grey"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_header"
android:layout_width=
"match_parent"
android:layout_height=
"120dp"
android:background=
"@drawable/background_gradient"
...
...
@@ -13,10 +15,131 @@
<ImageView
android:layout_width=
"180dp"
android:layout_height=
"60dp"
android:layout_marginHorizontal=
"24dp"
android:src=
"@drawable/logo"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id=
"@+id/ll_filters_list"
android:layout_width=
"match_parent"
android:layout_height=
"70dp"
android:layout_below=
"@+id/cl_header"
android:background=
"@android:color/white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingHorizontal=
"24dp"
>
<LinearLayout
android:id=
"@+id/ll_filter_list"
android:layout_width=
"100dp"
android:layout_height=
"40dp"
android:background=
"@drawable/background_rounded_corners_red"
android:gravity=
"center"
android:orientation=
"horizontal"
android:visibility=
"gone"
tools:visibility=
"visible"
>
<ImageView
android:layout_width=
"16dp"
android:layout_height=
"16dp"
android:layout_marginEnd=
"4dp"
android:src=
"@drawable/list"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:text=
"@string/eurobank_list"
android:textColor=
"@android:color/white"
android:textSize=
"18sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_filter_map"
android:layout_width=
"100dp"
android:layout_height=
"40dp"
android:background=
"@drawable/background_rounded_corners_red"
android:gravity=
"center"
android:orientation=
"horizontal"
android:visibility=
"gone"
tools:visibility=
"gone"
>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:src=
"@drawable/map"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:text=
"@string/eurobank_map"
android:textColor=
"@android:color/white"
android:textSize=
"18sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"40dp"
android:layout_marginStart=
"16dp"
android:background=
"@drawable/background_bottom_border"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:text=
"@string/eurobank_filter_all"
android:textColor=
"@color/grey_dark"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"40dp"
android:layout_marginStart=
"16dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:text=
"@string/eurobank_filter_home"
android:textColor=
"@color/grey_light"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"40dp"
android:layout_marginStart=
"16dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:text=
"@string/eurobank_filter_health"
android:textColor=
"@color/grey_light"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:id=
"@+id/fl_fragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/ll_filters_list"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</RelativeLayout>
...
...
warply_android_sdk/src/main/res/layout/fragment_campaigns.xml
0 → 100644
View file @
9b0e61d
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_active_campaigns"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:orientation=
"vertical"
android:overScrollMode=
"never"
android:paddingVertical=
"16dp"
android:layout_marginHorizontal=
"16dp"
android:scrollbars=
"none"
/>
</RelativeLayout>
warply_android_sdk/src/main/res/layout/fragment_map.xml
0 → 100644
View file @
9b0e61d
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<fragment
android:id=
"@+id/mv_shops"
class=
"com.google.android.gms.maps.SupportMapFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
warply_android_sdk/src/main/res/values/colors.xml
View file @
9b0e61d
...
...
@@ -6,4 +6,8 @@
<color
name=
"grey"
>
#E7EAEB
</color>
<color
name=
"blue_dark"
>
#081748
</color>
<color
name=
"blue"
>
#204EAC
</color>
<color
name=
"red"
>
#EA002A
</color>
<color
name=
"grey_dark"
>
#484848
</color>
<color
name=
"red2"
>
#E8002A
</color>
<color
name=
"grey_light"
>
#D3D3D3
</color>
</resources>
\ No newline at end of file
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
9b0e61d
...
...
@@ -4,4 +4,10 @@
<string
name=
"rate_dialog_positive"
>
Rate Now
</string>
<string
name=
"rate_diloag_neutral"
>
Remind Me Later
</string>
<string
name=
"rate_dialog_negative"
>
No, Thanks
</string>
<string
name=
"eurobank_list"
>
Λίστα
</string>
<string
name=
"eurobank_map"
>
Χάρτης
</string>
<string
name=
"eurobank_filter_all"
>
Όλα
</string>
<string
name=
"eurobank_filter_home"
>
Σπίτι
</string>
<string
name=
"eurobank_filter_health"
>
Υγεία
</string>
<string
name=
"eurobank_pin_name"
>
Test Pin
</string>
</resources>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment