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

Track state of initial overlain views margins #9391

Merged
merged 1 commit into from
Jun 29, 2017

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jun 29, 2017

closes #9379, this PR tracks the set value of margins instead of relying on the value at that time. This is needed for a correct MapboxMap#setPadding integration.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jun 29, 2017
@tobrun tobrun added this to the android-v5.2.0 milestone Jun 29, 2017
@tobrun tobrun self-assigned this Jun 29, 2017
@@ -370,6 +376,10 @@ public int getCompassGravity() {
*/
@UiThread
public void setCompassMargins(int left, int top, int right, int bottom) {
compassMargins[0] = left;
Copy link
Contributor

@Guardiola31337 Guardiola31337 Jun 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same instructions (with different variables) are also present in setLogoMargins and setAttributionMargins methods.
What about extracting them into a method passing an array and left, top, right and bottom variables and remove the duplication?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, has been addressed in 04949dc

@tobrun tobrun force-pushed the 9379-state-of-initial-margins branch from ff9eb9b to 04949dc Compare June 29, 2017 09:49
@tobrun tobrun force-pushed the 9379-state-of-initial-margins branch from 04949dc to 271e6d4 Compare June 29, 2017 10:09
Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@tobrun tobrun merged commit f836425 into master Jun 29, 2017
@tobrun tobrun deleted the 9379-state-of-initial-margins branch June 29, 2017 11:37
@tobrun tobrun modified the milestones: android-v5.1.3, android-v5.2.0 Aug 10, 2017
@tobrun
Copy link
Member Author

tobrun commented Aug 10, 2017

Moving this PR to android-v5.1.3 milestone so we can cherry-pick it for that release.

cc @zugaldia

@tobrun tobrun mentioned this pull request Aug 18, 2017
19 tasks
mappy-mobile pushed a commit to Mappy/mapbox-gl-native that referenced this pull request Sep 1, 2017
* release-ios-v3.6.0-android-v5.1.0: (89 commits)
  [tests] Cherry-pick OfflineDatabase::databaseTableColumns
  [tests] Enforce the schema downgrade behavior
  [core] Remove database on schema downgrade
  [ios] Set location to nil until the user's location is determined
  [ios] Support iOS 11 location usage descriptions
  [ios] Print Xcode and SDK version during packaging
  [build] Don't fail hard for unknown warning groups
  [build] Don't use maybe-uninitialized and misleading-indentation in Clang, since they're not implemented there
  [ios] Fix heading update loop
  [ios] Document annotations-as-features limitations w/feature querying
  [android] - update config for next reelease
  [android] - update changelog for v5.1.3
  bumped MAS version number
  [android] - avoid IndexOutOfBounds when destroying map object
  [android] - enable location change animation of MyLocationView by default
  [android] - re-add projectedMeters
  [android] - create smallest possible LatLngBounds when visible region crosses the dateline
  [android] - provide compability with Samsung devices forcing 3-4 array matrix length
  [android] - keep state of initial overlain views margins (mapbox#9391)
  [ios] Update pods spec for iOS v3.6.2 (mapbox#9806)
  ...

# Conflicts:
#	platform/android/MapboxGLAndroidSDK/proguard-rules.pro
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
#	platform/android/dependencies.gradle
#	src/mbgl/renderer/painter_line.cpp
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Padding can only be set once
2 participants