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.

MarkerView anchor after resizing View #8798

Closed

Description

@Larnoo

Platform: Android
Mapbox SDK version: 5.0.0

Steps to trigger behavior

  1. the marker view anchor is 0.5f, 1.0f.
  2. When click marker view, at MarkerViewAdapter->onSelect, I update the convertView size.
  3. the marker view anchor is not at bottom-center!

deselect
screenshot_2017-04-24-12-12-13
selected
screenshot_2017-04-24-12-13-38

Activity

  1. tobrun commented on Apr 24, 2017

    @tobrun
    Member

    Would you be able to retest with using 5.0.2? this version contains a fix for anchoring in #8519. Thank you for reaching out and reporting your issue.

  2. added
    Android
    on Apr 24, 2017
  3. tobrun commented on Apr 24, 2017

    @tobrun
    Member

    Going to close this as this was tested with an older version without the fix from #8519. Feel free to let us know if this issue still an issue with 5.0.2. Thank you for reaching out. Closing for now.

  4. Larnoo commented on Apr 24, 2017

    @Larnoo
    Author

    @tobrun
    I use Mapbox SDK v5.0.2, but I have the same problem.
    The patch can't solve my problem.

    Becasue my MarkerView is not a ImageView but a TextView.

    When MarkerView selected, I update TextView with larger text size, but the MakerView width and height is not update.

    So the MarkerView anchor is incorrect!

      /**
       * Update and invalidate the MarkerView icon.
       *
       * @param markerView the marker view to updates.
       */
      public void updateIcon(@NonNull MarkerView markerView) {
        View convertView = markerViewMap.get(markerView);
        if (convertView != null && convertView instanceof ImageView) {
          ((ImageView) convertView).setImageBitmap(markerView.getIcon().getBitmap());
          markerView.invalidate();
        }
      }
    
    
  5. tobrun commented on Apr 24, 2017

    @tobrun
    Member

    Thank you for retesting. Was able to reproduce the issue. Linking #6805 as the solution for that issue will require introducing wrapper ViewGroup. This wrapper could be used to apply the anchoring on apply a gravity to the View of the MarkerView. Reopening.

  6. reopened this on Apr 24, 2017
  7. changed the title [-]MarkerView bug[/-] [+]MarkerView anchor after resizing View[/+] on Apr 24, 2017
  8. Guardiola31337 commented on Jun 21, 2017

    @Guardiola31337
    Contributor

    Hey 👋 @Larnoo
    First of all, thanks a lot for reaching out and report your problem.

    This should be fixed with #9282. Would you be able to retest using 5.1.0-beta.5 or the SNAPSHOT to verify if it's fixed? Thanks again!

  9. Guardiola31337 commented on Jun 21, 2017

    @Guardiola31337
    Contributor

    Going ahead and closing here.

    @Larnoo thanks for using Mapbox and feel free to open new tickets if you find any other issues 😉

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

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions