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.

OnMapReadyCallback invoked when view is unmeasured #6999

Closed

Description

@tobrun

Since the 4.2.0 release we are using DID_FINISH_LOADING_STYLE as event to invoke the OnMapReadyCallback. An issue noticed is that there are situations that the DID_FINISH_LOADING_STYLE event is emitted before the MapView is even measured. This currently results in using width 0 in some calculations (eg. #6769). I think we should take in account if the view is actually measured before providing the user the MapboxMap.

A way to listen if a View is measured is using a OnGlobalLayoutListener.

Activity

  1. added
    Android
    on Nov 10, 2016
  2. added this to the android-v5.0.0 milestone on Nov 10, 2016
  3. tobrun commented on Jan 19, 2017

    @tobrun
    MemberAuthor

    Picking this up as part of #7736, for that refactor I'm required to move initialization of the map object and postpone other initializations. I'm hoping that as a side effect this will result in the view being already measured when we initialize, else we need to look into including OnGlobalLayoutListener as part of the initialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions