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.
As mentioned IRL, we need to rewrite UserLocationView from scratch. The list below shows the issues we have with current implementation, some of these can only be resolved by starting from scratch:
Start from scratch
Implement onMeasure / onDraw with a foreground drawable and shadow drawable
Add Arrow / acuracy circle
Integrate into existing project/requirements
Make a distinction between tracking and non tracking behaviour
Possibility of replacing the UserLocationView with an user provided implementation*
@zugaldia
The * item should help support the idea of introducing a separate navigation mode. Not sure how this will translate to our current exposed tracking modes as MyBearingTracking and MyLocationTracking. But I'm currently thinking we can extract logic through interfaces (eg. keeping the view insync with the location of the user) and the dependencies it has with gestures could be replaced with a more general configuration as requested in #4151. To make that all possible we will need multiple abstractions.
Step one here is to start from scratch and try getting in the same details as before.
The biggest chance that also will help with #3189 and #3947, is making the UserLocationView do WRAP_CONTENT instead of MATCH_PARENT
The previous implementation had a lot if - else checks based on type of tracking. For this refactor I'm thinking about doing 2 separate views or introducing a behaviour model within the view.
Another item I'm looking at is using LayerDrawables to layer different drawables on top of each other and see if the subclass TransitionDrawable can help with this.
update: LayerDrawables will be an improvement over current used components, TransitionDrawable use-cases do not match our use-case of UserLocationView
update: LayerDrawables should all have the same bounds, this is something we rather not do, we would like to have the shadow-drawable bigger than the actual user-drawable
First task is a success, I was able to create a custom view with 2 drawables aligned on top of eachother using WRAP_CONTENT. This is the first step to 🚀. I'm now optimising that the foreground drawable is bigger than the background and visa versa. This is needed to correctly calculate the correct bounds of the drawables.
update above is in place, now going to optimise the background drawable to be able to be positioned by the user using an offset. This will result in using an InsetDrawable for background drawable
update inset drawable is not what I'm looking for, It actually insets the bounds I calculated. So I will have to do this manually myself.
I'm able to show a background image that is larger and I'm able to show a background image with same size and with an offset this all works correctly for left-top, now need to look into right-bottom configurations.
Today I was able to correctly calculate bounds and having offsets to the drawables. Tomorrow will be focussed around getting previous features from 4.0.0 on par with the new implementation.
Activity
tobrun commentedon Apr 7, 2016
Step one here is to start from scratch and try getting in the same details as before.
The biggest chance that also will help with #3189 and #3947, is making the UserLocationView do
WRAP_CONTENTinstead ofMATCH_PARENTtobrun commentedon Apr 7, 2016
The previous implementation had a lot if - else checks based on type of tracking. For this refactor I'm thinking about doing 2 separate views or introducing a behaviour model within the view.
tobrun commentedon Apr 7, 2016
Another item I'm looking at is using LayerDrawables to layer different drawables on top of each other and see if the subclass TransitionDrawable can help with this.
update: LayerDrawables will be an improvement over current used components, TransitionDrawable use-cases do not match our use-case of UserLocationView
update: LayerDrawables should all have the same bounds, this is something we rather not do, we would like to have the
shadow-drawable bigger than the actualuser-drawabletobrun commentedon Apr 7, 2016
First task is a success, I was able to create a custom view with 2 drawables aligned on top of eachother using WRAP_CONTENT. This is the first step to 🚀. I'm now optimising that the foreground drawable is bigger than the background and visa versa. This is needed to correctly calculate the correct bounds of the drawables.
update above is in place, now going to optimise the background drawable to be able to be positioned by the user using an offset. This will result in using an
InsetDrawablefor background drawableupdate inset drawable is not what I'm looking for, It actually insets the bounds I calculated. So I will have to do this manually myself.
tobrun commentedon Apr 7, 2016
I'm able to show a background image that is larger and I'm able to show a background image with same size and with an offset this all works correctly for left-top, now need to look into right-bottom configurations.
tobrun commentedon Apr 7, 2016
Today I was able to correctly calculate bounds and having offsets to the drawables. Tomorrow will be focussed around getting previous features from
4.0.0on par with the new implementation.bleege commentedon Apr 7, 2016
💥
tobrun commentedon Apr 8, 2016
I implemented support for tilting, result of this can be seen in the child ticket. #3189 (comment)
tobrun commentedon Apr 8, 2016
I implemented support for tinting, result of this can be seen in the child ticket. #3231 (comment)
[android] #4396 - UserLocationView improvements
tobrun commentedon Apr 8, 2016
I have been working in a separate project, to get those changes in this project I'm starting from a #4626 and will gradually add/replace code from it.
56 remaining items
tobrun commentedon Apr 22, 2016
Noticing the same bug as iOS used to have with the location dot going backwards before going forwards
tobrun commentedon Apr 22, 2016
Going to PR current progress and create tickets for the remaining items
zugaldia commentedon Apr 22, 2016
@tobrun so excited to try the new behavior!
[android] #4396 - UserLocationView improvements
[android] #4396 - UserLocationView refactor
[android] #4396 - new images for UserLocationView
[android] #4396 - cleanup code
[android] #4396 - introduced behaviour model using a factory. fixed d…
[android] #4396 - model integration
[android] #4396 - fixup mason build issue
[android] #4396 - UserLocationView accuracy & non-tracking animation …
[android] #4396 - UserLocationView Refactor fix tests
[android] #4396 - fixed test activity tracking settings modes, Deprec…
[android] #4396 - Cleanup + javadoc TrackingSettings class