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-07-24 16:26:34 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
57215601070b49db793601d24bf895285e663407
57215601
1 parent
f8786e9b
map fixes fixes
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
26 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsHuaweiActivity.java
warply_android_sdk/build.gradle
View file @
5721560
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc
69
'
PUBLISH_VERSION
=
'4.5.4.6rc
70
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
View file @
5721560
...
...
@@ -71,6 +71,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
private
MerchantList
mMerchantList
=
new
MerchantList
();
private
AlertDialog
mAlertDialogNoShopsAvailable
;
private
Merchant
mMerchant
,
mMerchantParent
;
private
ArrayList
<
Merchant
>
mMerchantParentList
=
new
ArrayList
<>();
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -214,7 +215,14 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
dialogClose
.
setOnClickListener
(
view
->
bottomSheetDialog
.
dismiss
());
TextView
pinTitle
=
(
TextView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
tv_pin_title
);
pinTitle
.
setText
(
mMerchantParent
!=
null
?
mMerchantParent
.
getAdminName
()
:
merch
.
getAdminName
());
if
(
mMerchantParentList
!=
null
&&
mMerchantParentList
.
size
()
>
0
)
{
for
(
Merchant
parentMerch
:
mMerchantParentList
)
{
if
(
parentMerch
.
getUuid
().
equals
(
merch
.
getParent
()))
{
pinTitle
.
setText
(
parentMerch
.
getAdminName
());
break
;
}
}
}
ImageView
pinLogo
=
(
ImageView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
iv_pin_logo
);
if
(!
TextUtils
.
isEmpty
(
merch
.
getImgPreview
()))
{
...
...
@@ -319,7 +327,8 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
if
(
merchCoords
.
getLatitude
()
!=
0.0
&&
merchCoords
.
getLongitude
()
!=
0.0
)
{
nonNullCoords
++;
}
else
{
mMerchantParent
=
merchCoords
;
// mMerchantParent = merchCoords;
mMerchantParentList
.
add
(
merchCoords
);
}
}
...
...
@@ -368,7 +377,8 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
if
(
merchCoords
.
getLatitude
()
!=
0.0
&&
merchCoords
.
getLongitude
()
!=
0.0
)
{
nonNullCoords
++;
}
else
{
mMerchantParent
=
merchCoords
;
// mMerchantParent = merchCoords;
mMerchantParentList
.
add
(
merchCoords
);
}
}
...
...
@@ -377,15 +387,20 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
return
;
}
if
(
mMerchantParent
!=
null
)
{
for
(
Merchant
merch
:
result
)
{
merch
.
setImg_preview
(
mMerchantParent
.
getImgPreview
());
if
(
merch
.
getLatitude
()
!=
0.0
&&
merch
.
getLongitude
()
!=
0.0
)
{
mMap
.
addMarker
(
new
MarkerOptions
()
.
position
(
new
LatLng
(
merch
.
getLatitude
(),
merch
.
getLongitude
()))
.
anchor
(
0.5f
,
0.5f
)
.
title
(
merch
.
getTitle
())
.
snippet
(
merch
.
getUuid
()));
// if (mMerchantParent != null) {
if
(
mMerchantParentList
!=
null
&&
mMerchantParentList
.
size
()
>
0
)
{
for
(
Merchant
parentMerch
:
mMerchantParentList
)
{
for
(
Merchant
merch
:
result
)
{
if
(
parentMerch
.
getUuid
().
equals
(
merch
.
getParent
()))
{
merch
.
setImg_preview
(
parentMerch
.
getImgPreview
());
if
(
merch
.
getLatitude
()
!=
0.0
&&
merch
.
getLongitude
()
!=
0.0
)
{
mMap
.
addMarker
(
new
MarkerOptions
()
.
position
(
new
LatLng
(
merch
.
getLatitude
(),
merch
.
getLongitude
()))
.
anchor
(
0.5f
,
0.5f
)
.
title
(
merch
.
getTitle
())
.
snippet
(
merch
.
getUuid
()));
}
}
}
}
}
else
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsHuaweiActivity.java
View file @
5721560
...
...
@@ -69,6 +69,7 @@ public class ShopsHuaweiActivity extends FragmentActivity implements View.OnClic
private
MerchantList
mMerchantList
=
new
MerchantList
();
private
AlertDialog
mAlertDialogNoShopsAvailable
;
private
Merchant
mMerchant
,
mMerchantParent
;
private
ArrayList
<
Merchant
>
mMerchantParentList
=
new
ArrayList
<>();
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -215,7 +216,14 @@ public class ShopsHuaweiActivity extends FragmentActivity implements View.OnClic
dialogClose
.
setOnClickListener
(
view
->
bottomSheetDialog
.
dismiss
());
TextView
pinTitle
=
(
TextView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
tv_pin_title
);
pinTitle
.
setText
(
mMerchantParent
!=
null
?
mMerchantParent
.
getAdminName
()
:
merch
.
getAdminName
());
if
(
mMerchantParentList
!=
null
&&
mMerchantParentList
.
size
()
>
0
)
{
for
(
Merchant
parentMerch
:
mMerchantParentList
)
{
if
(
parentMerch
.
getUuid
().
equals
(
merch
.
getParent
()))
{
pinTitle
.
setText
(
parentMerch
.
getAdminName
());
break
;
}
}
}
ImageView
pinLogo
=
(
ImageView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
iv_pin_logo
);
if
(!
TextUtils
.
isEmpty
(
merch
.
getImgPreview
()))
{
...
...
@@ -336,7 +344,8 @@ public class ShopsHuaweiActivity extends FragmentActivity implements View.OnClic
if
(
merchCoords
.
getLatitude
()
!=
0.0
&&
merchCoords
.
getLongitude
()
!=
0.0
)
{
nonNullCoords
++;
}
else
{
mMerchantParent
=
merchCoords
;
// mMerchantParent = merchCoords;
mMerchantParentList
.
add
(
merchCoords
);
}
}
...
...
@@ -386,7 +395,8 @@ public class ShopsHuaweiActivity extends FragmentActivity implements View.OnClic
if
(
merchCoords
.
getLatitude
()
!=
0.0
&&
merchCoords
.
getLongitude
()
!=
0.0
)
{
nonNullCoords
++;
}
else
{
mMerchantParent
=
merchCoords
;
// mMerchantParent = merchCoords;
mMerchantParentList
.
add
(
merchCoords
);
}
}
...
...
@@ -395,16 +405,21 @@ public class ShopsHuaweiActivity extends FragmentActivity implements View.OnClic
return
;
}
if
(
mMerchantParent
!=
null
)
{
for
(
Merchant
merch
:
result
)
{
merch
.
setImg_preview
(
mMerchantParent
.
getImgPreview
());
if
(
merch
.
getLatitude
()
!=
0.0
&&
merch
.
getLongitude
()
!=
0.0
)
{
mMap
.
addMarker
(
new
MarkerOptions
()
.
position
(
new
LatLng
(
merch
.
getLatitude
(),
merch
.
getLongitude
()))
.
anchor
(
0.5f
,
0.5f
)
.
title
(
merch
.
getTitle
())
.
snippet
(
merch
.
getUuid
())
.
clusterable
(
true
));
// if (mMerchantParent != null) {
if
(
mMerchantParentList
!=
null
&&
mMerchantParentList
.
size
()
>
0
)
{
for
(
Merchant
parentMerch
:
mMerchantParentList
)
{
for
(
Merchant
merch
:
result
)
{
if
(
parentMerch
.
getUuid
().
equals
(
merch
.
getParent
()))
{
merch
.
setImg_preview
(
parentMerch
.
getImgPreview
());
if
(
merch
.
getLatitude
()
!=
0.0
&&
merch
.
getLongitude
()
!=
0.0
)
{
mMap
.
addMarker
(
new
MarkerOptions
()
.
position
(
new
LatLng
(
merch
.
getLatitude
(),
merch
.
getLongitude
()))
.
anchor
(
0.5f
,
0.5f
)
.
title
(
merch
.
getTitle
())
.
snippet
(
merch
.
getUuid
())
.
clusterable
(
true
));
}
}
}
}
}
else
{
...
...
Please
register
or
login
to post a comment