summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2015-11-13 08:54:51 +0100
committerTobrun <tobrun.van.nuland@gmail.com>2015-11-13 10:43:42 +0100
commitbcd5db4a46fcbc2fd8db315cbc4e45d3014713a1 (patch)
tree22207d67b308661494e2250f72e5ca4117f2ed08 /android
parent0ef7b42ae3763c5937aeb72be4f1999d73eefa6c (diff)
downloadqtlocation-mapboxgl-bcd5db4a46fcbc2fd8db315cbc4e45d3014713a1.tar.gz
[android] #3019 - optimise visible coordinatebounds
Diffstat (limited to 'android')
-rw-r--r--android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/VisibleCoordinateBoundsActivity.java3
-rw-r--r--android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml1
2 files changed, 3 insertions, 1 deletions
diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/VisibleCoordinateBoundsActivity.java b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/VisibleCoordinateBoundsActivity.java
index 413acf9328..f245aa1075 100644
--- a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/VisibleCoordinateBoundsActivity.java
+++ b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/VisibleCoordinateBoundsActivity.java
@@ -56,7 +56,8 @@ public class VisibleCoordinateBoundsActivity extends AppCompatActivity {
.setAction(android.R.string.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
- mMapView.setVisibleCoordinateBounds(new CoordinateBounds(losAngeles, newYork), new RectF(200, 0, 200, 0), true);
+ float margin = getResources().getDimension(R.dimen.coordinatebounds_margin);
+ mMapView.setVisibleCoordinateBounds(new CoordinateBounds(losAngeles, newYork), new RectF(margin, 0, margin, 0), true);
}
}).show();
}
diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml b/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
index ec0e973cb8..87cfebffd6 100644
--- a/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
+++ b/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
@@ -2,4 +2,5 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="attr_margin">10dp</dimen>
+ <dimen name="coordinatebounds_margin">32dp</dimen>
</resources>