Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

UserLocationView refactor #4396

Closed
Closed

Description

@tobrun

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:

@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.

cc @bleege

Activity

  1. added
    Android
    on Mar 19, 2016
  2. added
    navigation
    on Mar 21, 2016
  3. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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

  4. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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.

  5. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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

  6. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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.

  7. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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.

  8. tobrun commented on Apr 7, 2016

    @tobrun
    MemberAuthor

    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.

  9. bleege commented on Apr 7, 2016

    @bleege
    Contributor

    Today I was able to correctly calculate bounds and having offsets to the drawables.

    💥

  10. added this to the android-v4.1.0 milestone on Apr 8, 2016
  11. tobrun commented on Apr 8, 2016

    @tobrun
    MemberAuthor

    I implemented support for tilting, result of this can be seen in the child ticket. #3189 (comment)

  12. tobrun commented on Apr 8, 2016

    @tobrun
    MemberAuthor

    I implemented support for tinting, result of this can be seen in the child ticket. #3231 (comment)

  13. added a commit that references this issue on Apr 8, 2016
  14. tobrun commented on Apr 8, 2016

    @tobrun
    MemberAuthor

    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.

  15. 56 remaining items

  16. tobrun commented on Apr 22, 2016

    @tobrun
    MemberAuthor

    Noticing the same bug as iOS used to have with the location dot going backwards before going forwards

  17. tobrun commented on Apr 22, 2016

    @tobrun
    MemberAuthor

    Going to PR current progress and create tickets for the remaining items

  18. zugaldia commented on Apr 22, 2016

    @zugaldia
    Member

    @tobrun so excited to try the new behavior!

  19. added 11 commits that reference this issue on Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidnavigationrefactor

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions