You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Make select/deselect animation more flexible on MarkerView #5171
This limits end users to only providing animations through an animator created in xml.
To be more flexible I'm proposing to provide a callback interface instead and manage a selected state inside of MarkerView. This callback will provide the developer with an instance of the View and this gives the developer more flexibility to do animations (or even do non animations things as for example hiding the MarkerView).
Side notes:
View reuse could be affected by this. It's possible that we need to look into the same prepareForReuse callback as iOS.
There are other issues related to selection state that should be solved to completely get a correct select/deselect user experience. Will look into identifying and linking them back.
In general when it comes to animations, I envisioned 4 primary use-cases:
on enter screen animation
on select marker animation
on deselect marker animation
on remove screen animation ( = prepareForReuse)
The enter animation can be configured when calling an animation in the getView of the ViewMarkerAdapter since this will be called when you pan the viewport to an marker. For removing I'm considering adding a non-required removeView. This method is responsible of resetting the state back to it's normal state.
For the select/deselect animation, I'm thinking of adding callback interfaces and provide the user with the View object to animate.
Note: that users can even provide additional animation on top of these 4 cases, as long as they properly reset the View state when the View is being removed.
Instead of calling this removeView, I'm going to call the method prepareViewForReuse. Since we aren't actually removing the View were are adding this to a pool of Views to be reused.
Activity
tobrun commentedon Jun 3, 2016
In general when it comes to animations, I envisioned 4 primary use-cases:
prepareForReuse)The
enteranimation can be configured when calling an animation in thegetViewof the ViewMarkerAdapter since this will be called when you pan the viewport to an marker. For removing I'm considering adding a non-requiredremoveView. This method is responsible of resetting the state back to it's normal state.For the
select/deselectanimation, I'm thinking of adding callback interfaces and provide the user with the View object to animate.Note: that users can even provide additional animation on top of these 4 cases, as long as they properly reset the View state when the View is being removed.
tobrun commentedon Jun 3, 2016
Instead of calling this
removeView, I'm going to call the methodprepareViewForReuse. Since we aren't actually removing the View were are adding this to a pool of Views to be reused.tobrun commentedon Jun 6, 2016
merged in #5227 onto
release-v4.1.0branch