-
-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android annotations: Implement CollisionGroup
#2304
base: android-annotations
Are you sure you want to change the base?
Android annotations: Implement CollisionGroup
#2304
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## android-annotations #2304 +/- ##
========================================================
- Coverage 85.73% 59.85% -25.88%
========================================================
Files 568 580 +12
Lines 28027 28530 +503
Branches 0 11093 +11093
========================================================
- Hits 24030 17078 -6952
- Misses 3997 4229 +232
- Partials 0 7223 +7223 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,121 @@ | |||
package org.maplibre.android.annotations | |||
|
|||
import okhttp3.internal.toImmutableList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably not use internal packages.
import org.maplibre.android.annotations.data.Defaults | ||
import kotlin.properties.Delegates | ||
|
||
class CollisionGroup( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs some documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an example to the test app or modify an existing example?
@@ -1054,6 +1056,10 @@ public void addAnnotations(@NonNull KAnnotation... annotations) { | |||
} | |||
} | |||
|
|||
public void addCollisionGroup(@NonNull CollisionGroup collisionGroup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a documentation comment.
@@ -1090,6 +1096,10 @@ public void removeAnnotations(@NonNull KAnnotation... annotations) { | |||
} | |||
} | |||
|
|||
public void removeCollisionGroup(@NonNull CollisionGroup collisionGroup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a documentation comment.
Android annotations API proposal implementation PR as a part of #1491. Closes #1495.
CollisionGroup
is implemented per specification. In effect, it is somewhat of a wrapper aroundSymbolManager
.CollisionGroupTest
contains some tests I found to be helpful.symbols
is currently immutable, and can be set to a new value through assignment (which we listen to usingDelegates.observable
). We could decide to addadd(Symbol)
,delete(Symbol)
, etc. instead.