diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2016-05-06 11:59:49 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2016-05-20 12:00:02 +0200 |
commit | d8dfc921b4d9c9f15bdd33c45ef7d2d77e04ba1b (patch) | |
tree | d89abe0750d3be1c19ea00aeb6c220a7e5639ec3 /platform/android/MapboxGLAndroidSDKTestApp | |
parent | 20e7b140b7ef11029cd295b1760b70d60e4df0b2 (diff) | |
download | qtlocation-mapboxgl-d8dfc921b4d9c9f15bdd33c45ef7d2d77e04ba1b.tar.gz |
[android] #3276 - fix unit tests on MapboxMapTest related to Marker/BaseMarker
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp')
3 files changed, 12 insertions, 30 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml index 687592502f..12dee036fb 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml @@ -27,29 +27,10 @@ <com.mapbox.mapboxsdk.maps.MapView android:id="@id/mapView" android:layout_width="match_parent" + android:layout_height="match_parent" app:access_token="@string/mapbox_access_token" app:style_url="@string/style_light" - android:layout_height="match_parent" /> - - <!--<android.support.design.widget.FloatingActionButton--> - <!--android:id="@id/fab"--> - <!--android:layout_width="wrap_content"--> - <!--android:layout_height="wrap_content"--> - <!--android:layout_gravity="end|bottom"--> - <!--android:layout_marginBottom="82dp"--> - <!--android:layout_marginRight="@dimen/fab_margin"--> - <!--android:src="@drawable/ic_refresh_24dp"--> - <!--app:backgroundTint="@color/accent"--> - <!--app:layout_anchorGravity="top" />--> - - <android.support.design.widget.FloatingActionButton - android:id="@id/fab" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end|bottom" - android:layout_margin="@dimen/fab_margin" - android:src="@drawable/ic_layers_24dp" - app:backgroundTint="@color/primary" /> + app:zoom="1" /> </android.support.design.widget.CoordinatorLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 840427af09..a84035aa58 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -17,8 +17,8 @@ <string name="activity_polyline">Polyline</string> <string name="activity_polygon">Polygon</string> <string name="activity_press_for_marker">Press Map For Marker</string> - <string name="activity_view_marker">x</string> - + <string name="activity_view_marker">View Marker API</string> + <!-- InfoWindow--> <string name="activity_info_window">Standard InfoWindow example</string> <string name="activity_infowindow_adapter">Custom InfoWindow Adapter</string> @@ -77,7 +77,7 @@ <string name="description_scroll_by">Scroll with pixels in x,y direction</string> <string name="description_snapshot">Example to make a snapshot of the map</string> <string name="description_doublemap">2 maps in a view hierarchy</string> - <string name="description_view_marker">x</string> + <string name="description_view_marker">Use an Android SDK View as marker</string> <string name="menuitem_title_concurrent_infowindow">Concurrent Open InfoWindows</string>r <string name="menuitem_title_tracking_mode_dismiss_on_gesture">Dismiss location tracking on gesture</string> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapTest.java index e7362cca4a..b69ba4e3f8 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapTest.java @@ -4,6 +4,7 @@ import android.graphics.Color; import android.graphics.Point; import android.graphics.PointF; +import com.mapbox.mapboxsdk.annotations.BaseMarkerOptions; import com.mapbox.mapboxsdk.annotations.Marker; import com.mapbox.mapboxsdk.annotations.MarkerOptions; import com.mapbox.mapboxsdk.annotations.Polygon; @@ -578,7 +579,7 @@ public class MapboxMapTest { @Test public void testAddMarkers() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); MarkerOptions markerOptions1 = new MarkerOptions().title("a"); MarkerOptions markerOptions2 = new MarkerOptions().title("b"); markerList.add(markerOptions1); @@ -591,14 +592,14 @@ public class MapboxMapTest { @Test public void testAddMarkersEmpty() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); mMapboxMap.addMarkers(markerList); assertEquals("Markers size should be 0", 0, mMapboxMap.getMarkers().size()); } @Test public void testAddMarkersSingleMarker() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); MarkerOptions markerOptions = new MarkerOptions().title("a"); markerList.add(markerOptions); mMapboxMap.addMarkers(markerList); @@ -741,7 +742,7 @@ public class MapboxMapTest { @Test public void testRemoveAnnotations() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); MarkerOptions markerOptions1 = new MarkerOptions().title("a"); MarkerOptions markerOptions2 = new MarkerOptions().title("b"); markerList.add(markerOptions1); @@ -753,7 +754,7 @@ public class MapboxMapTest { @Test public void testClear() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); MarkerOptions markerOptions1 = new MarkerOptions().title("a"); MarkerOptions markerOptions2 = new MarkerOptions().title("b"); markerList.add(markerOptions1); @@ -765,7 +766,7 @@ public class MapboxMapTest { @Test public void testRemoveAnnotationsByList() { - List<MarkerOptions> markerList = new ArrayList<>(); + List<BaseMarkerOptions> markerList = new ArrayList<>(); MarkerOptions markerOptions1 = new MarkerOptions().title("a"); MarkerOptions markerOptions2 = new MarkerOptions().title("b"); markerList.add(markerOptions1); |