-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[android] Polygon holes signature refactor #8722
Conversation
@@ -12,7 +12,7 @@ | |||
/** | |||
* Encapsulates a {@link List} of {@link LatLng} points defining a hole | |||
*/ | |||
public class Hole extends ArrayList<LatLng> implements Parcelable { | |||
class Hole extends ArrayList<LatLng> implements Parcelable { |
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.
since we are removing Hole.java from public API, is there a benefit of keeping this class around?
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.
Didn't find a way to create a Parcelable
of List<List<LatLng>>
.
Do you know how?
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.
If the outermost class is parcelable it can take care of all it's members. No need for a separate class for the holes in that case. Just move the logic over to Polygon.
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.
It seems
List<List<LatLng>> holes = new ArrayList<>();
in.readList(holes, LatLng.class.getClassLoader());
does the trick. Fixed it 😉
b1a4478
to
20a5bc7
Compare
20a5bc7
to
b6c914e
Compare
Refactored signature from
Hole
toList<LatLng>
.👀 @tobrun @ivovandongen