Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share white
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
location share white
Commits
dc3983ed
Commit
dc3983ed
authored
Oct 30, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
a465abc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
ViewingBean.kt
...main/java/com/base/locationsharewhite/bean/ViewingBean.kt
+1
-1
LocationMapActivity.kt
.../locationsharewhite/ui/locationmap/LocationMapActivity.kt
+14
-0
No files found.
app/src/main/java/com/base/locationsharewhite/bean/ViewingBean.kt
View file @
dc3983ed
...
@@ -6,7 +6,7 @@ package com.base.locationsharewhite.bean
...
@@ -6,7 +6,7 @@ package com.base.locationsharewhite.bean
data class
ViewingBean
(
data class
ViewingBean
(
val
device
:
String
,
val
device
:
String
,
val
nickname
:
String
,
val
nickname
:
String
,
val
status
:
Int
=
-
1
,
val
status
:
Int
=
-
1
,
//1可见,0不可见
var
locatDate
:
LocationData
?
=
null
,
var
locatDate
:
LocationData
?
=
null
,
)
)
...
...
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationMapActivity.kt
View file @
dc3983ed
...
@@ -97,6 +97,13 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -97,6 +97,13 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
binding
.
rvViewing
.
adapter
=
adapter
binding
.
rvViewing
.
adapter
=
adapter
}
}
private
fun
cancelGetLocationJob
()
{
currentViewingBean
=
null
getLocationJob
?.
cancel
()
getLocationJob
=
null
friendMarker
?.
remove
()
}
@SuppressLint
(
"NotifyDataSetChanged"
)
@SuppressLint
(
"NotifyDataSetChanged"
)
private
fun
startGetLocationJob
()
{
private
fun
startGetLocationJob
()
{
getLocationJob
?.
cancel
()
getLocationJob
?.
cancel
()
...
@@ -121,6 +128,10 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -121,6 +128,10 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
}
}
}
}
}
}
if
(
currentViewingBean
==
null
)
{
friendMarker
?.
remove
()
friendMarker
=
null
}
delay
(
10
*
1000L
)
delay
(
10
*
1000L
)
}
}
}
}
...
@@ -142,6 +153,8 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -142,6 +153,8 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
runOnUiThread
{
runOnUiThread
{
if
(
it
.
isEmpty
())
{
if
(
it
.
isEmpty
())
{
showFriendGuideOrNoFriend
()
showFriendGuideOrNoFriend
()
adapter
.
submitList
(
listOf
())
cancelGetLocationJob
()
}
else
{
}
else
{
binding
.
llFriendsGuide
.
visibility
=
View
.
GONE
binding
.
llFriendsGuide
.
visibility
=
View
.
GONE
binding
.
llNoFriend
.
visibility
=
View
.
GONE
binding
.
llNoFriend
.
visibility
=
View
.
GONE
...
@@ -280,6 +293,7 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -280,6 +293,7 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
val
friendAvatar
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
avatar_friend
,
null
)
val
friendAvatar
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
avatar_friend
,
null
)
LogEx
.
logDebug
(
TAG
,
"initViewingBeanMarker locatDate ${locatDate.latitude} ${locatDate.longitude}"
)
LogEx
.
logDebug
(
TAG
,
"initViewingBeanMarker locatDate ${locatDate.latitude} ${locatDate.longitude}"
)
friendMarker
=
map
?.
addLocationMarker
(
friendAvatar
,
latLng
,
viewingBean
.
nickname
)
friendMarker
=
map
?.
addLocationMarker
(
friendAvatar
,
latLng
,
viewingBean
.
nickname
)
changeMarkerZIndex
(
false
)
}
}
setViewingBeanLocation
(
latLng
,
resetZoom
)
setViewingBeanLocation
(
latLng
,
resetZoom
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment