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

CoordinatorLayout unmeasured issue with focal point #7940

Closed
cammace opened this issue Feb 3, 2017 · 4 comments
Closed

CoordinatorLayout unmeasured issue with focal point #7940

cammace opened this issue Feb 3, 2017 · 4 comments
Assignees
Labels
Android Mapbox Maps SDK for Android bug

Comments

@cammace
Copy link
Contributor

cammace commented Feb 3, 2017

When my location tracking is enabled, and the map view is in a coordinator layout, the focal point is set to 0.0 (instead of being null?). This causes strange gesture behavior:

ezgif com-video-to-gif 3

cc: @tobrun @zugaldia

SimpleMapActivity in testapp:

@Override
  public void onMapReady(MapboxMap mapboxMap) {

    mapboxMap.getTrackingSettings().setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);
  }

Layout:

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:mapbox="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    tools:context=".activity.maplayout.SimpleMapActivity">

    <com.mapbox.mapboxsdk.maps.MapView
        android:id="@id/mapView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        mapbox:mapbox_uiAttribution="false"
        mapbox:mapbox_cameraTargetLat="40.73581"
        mapbox:mapbox_cameraTargetLng="-73.99155"
        mapbox:mapbox_uiCompassMarginTop="32dp"
        mapbox:mapbox_uiLogo="false"
        mapbox:mapbox_styleUrl="mapbox://styles/mapbox/traffic-day-v1"
        mapbox:mapbox_cameraZoom="11"/>

</android.support.design.widget.CoordinatorLayout>
@cammace cammace added Android Mapbox Maps SDK for Android bug labels Feb 3, 2017
@cammace cammace added this to the android-v5.0.0 milestone Feb 3, 2017
@zugaldia
Copy link
Member

zugaldia commented Feb 6, 2017

cc: @Guardiola31337 for extra 👀

@tobrun
Copy link
Member

tobrun commented Feb 21, 2017

the underlying issue is that CoordinatorLayout works differently than other viewgroups under the hood. It doesn't have a height and width at the same time as other viewgroups would have. Need to debug this in more detail to suggest a fix.

update : I think this more related to how CoordinatorLayout dispatches measure/draw events to it's children.

@tobrun tobrun changed the title Focal point being set to 0 when location enabled CoordinatorLayout unmeasured issue with focal point Feb 21, 2017
@tobrun tobrun self-assigned this Feb 21, 2017
@tobrun
Copy link
Member

tobrun commented Feb 21, 2017

This will be fixed with picking up #6999:

ezgif com-video-to-gif 14

@tobrun
Copy link
Member

tobrun commented Feb 21, 2017

Fixed with #6999

@tobrun tobrun closed this as completed Feb 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

3 participants