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.

Improve InfoWindow background #2658

Closed

Description

@tobrun

Currently our background of the InfoWindow is constructed out of 2 objects:

  • White background of the LinearLayout wrapping the content of InfoWindow
  • InfoWindowTipView

I'm suggesting to create 1 background object to solve issue (#2636)
While doing this we also can add rounded corners (cfr. iOS)

Activity

  1. added
    Android
    on Oct 18, 2015
  2. added this to the android-v2.2.0 milestone on Oct 18, 2015
  3. tobrun commented on Oct 22, 2015

    @tobrun
    MemberAuthor

    Google Maps:

    infowindow_gmaps

    @ljbade:

    so to match them we need adjust the shape of the triangle, and a slight gap, drop shadow, and match the font size/bold/centre (with subtitle grey and smaller)

    Mapbox iOS:

    untitled

    @tobrun:

    this looks very slick, we could add rounded corners for Android, Google itself is also adding more rounded corners to their designs (see CardView or new Google Play design)

  4. bleege commented on Oct 22, 2015

    @bleege
    Contributor

    The Mapbox iOS InfoWindow is from https://github.com/nfarina/calloutview.

    As for Mapbox Android, I'd like to see something that is more in line with Material Design so that it "fits the platform". This is something that @tatsvc could help review.

  5. tatsvc commented on Oct 23, 2015

    @tatsvc

    I don't know much (anything) about android so I don't know if this would fit in at all 😬 but I'm happy to rework it with some concrete feedback!

    Option 1: stroke + drop shadow

    option1

    Option 2: Thick opaque stroke + drop shadow

    option2

  6. tobrun commented on Oct 23, 2015

    @tobrun
    MemberAuthor

    @tatsvc this already looks great!
    I personally prefer the first one. The shadow in the second one is a bit heavy.
    only other remark I have is making the gap between infowindow and marker a bit smaller.

    About designing for Android:

    I have a ton of more of these resources/vids related to Android design,
    ping me if you would like to have more.

  7. ljbade commented on Oct 23, 2015

    @ljbade
    Contributor

    I prefer the top one two, makes it look like it floating more.

  8. tatsvc commented on Oct 23, 2015

    @tatsvc

    option1
    option1cropped

  9. tatsvc commented on Oct 23, 2015

    @tatsvc

    It's going to be important to make sure the paddings are nicely balanced, to make it look more elegant! Let me know if you have any questions about this! Main point: give the text enough space to breathe!

    paddings

  10. ljbade commented on Oct 23, 2015

    @ljbade
    Contributor

    @tobrun if I understand what we need is a nine patch of the corners. And then another bit map clipped to the triangle.

    Do you also know what DPI those screen shots are so we can calculate the pixels dimensions?

    Then we can give @tatsvc a nice clear set of instructions.

  11. ljbade commented on Oct 23, 2015

    @ljbade
    Contributor

    @tobrun if I understand what we need is a nine patch of the corners. And then another bit map clipped to the triangle.

    Do you also know what DPI those screen shots are so we can calculate the pixels dimensions?

    Then we can give @tatsvc a nice clear set of instructions.

  12. tobrun commented on Oct 28, 2015

    @tobrun
    MemberAuthor

    👍

  13. 1 remaining item

  14. ljbade commented on Nov 11, 2015

    @ljbade
    Contributor

    Here is a rough nine patch I made from @tatsvc PNG:
    info_window_background 9
    info_window_tip

  15. ljbade commented on Nov 11, 2015

    @ljbade
    Contributor

    @tobrun Do you want to experiment with the nine patch ^ and see what you come up with?

    Otherwise if you think it might be better implemented using other techniques, see what you find.

  16. tobrun commented on Nov 11, 2015

    @tobrun
    MemberAuthor

    👍

    yeah will do, will try to whip up some custom drawing as wel.

  17. tobrun commented on Nov 11, 2015

    @tobrun
    MemberAuthor

    Might take up leaving InfoWindow open when panning the map.

  18. ljbade commented on Nov 11, 2015

    @ljbade
    Contributor

    @tobrun yep should be possible now

  19. tobrun commented on Nov 13, 2015

    @tobrun
    MemberAuthor

    @ljbade when I use the resources found ^ and changing their filename to .9.png,
    I'm gettinga malformed ninepatch error:

    image

  20. added a commit that references this issue on Nov 13, 2015
  21. tobrun commented on Nov 13, 2015

    @tobrun
    MemberAuthor

    Current progress, I'm not 💯 on board, I think drawing it ourselves will give best experience and will remove the negative margin. The code below besides nine patch image contains a bugfix for wrongly positioned InfoWindowTipView.

    Will PR this and make an issue for drawing instead of nine patch.

    device-2015-11-13-172405

    device-2015-11-13-172358

  22. bleege commented on Nov 13, 2015

    @bleege
    Contributor

    Current progress, I'm not 💯 on board, I think drawing it ourselves will give best experience and will remove the negative margin.

    This is a great start @tobrun. Getting a base level in sooner rather than later is a good move. We can always iterate to make it better over time. #SoftwareIsNeverDone

  23. ljbade commented on Nov 15, 2015

    @ljbade
    Contributor

    @tobrun While you are at it, support for the blue arrow (possibly optional via a property setting on Marker) will be great for highlighting when clicking on an InfoWindow will result in something happening, e.g. directions.

  24. added a commit that references this issue on Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Android

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions