From ff7cdb1ba5c93f51901dcab940ee42d863606f35 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Wed, 30 Mar 2016 13:03:37 +0200 Subject: [PATCH] [android] #4365 - reworked some samples, resources and tests --- .../testapp/espresso/CameraActivityTest.java | 38 --- .../CoordinateChangeActivityTest.java | 37 --- .../espresso/DoubleMapActivityTest.java | 38 --- .../espresso/MainActivityScreenTest.java | 87 ------ .../testapp/espresso/MainActivityTest.java | 260 ------------------ .../espresso/MapboxMapActivityTest.java | 36 --- .../espresso/MaxMinZoomActivityTest.java | 2 +- .../espresso/PressForMarkerActivityTest.java | 38 --- .../testapp/espresso/TiltActivityTest.java | 30 -- .../robotium/BaseMainActivityTest.java | 7 +- .../src/main/AndroidManifest.xml | 74 ++--- .../activity/CameraPositionActivity.java | 193 +++++++++++++ .../activity/CoordinateChangeActivity.java | 125 --------- .../testapp/activity/DoubleMapActivity.java | 171 ------------ .../activity/PressForMarkerActivity.java | 159 ----------- .../testapp/activity/TiltActivity.java | 96 ------- .../src/main/res/drawable/ic_blur_on_24dp.xml | 9 - .../main/res/drawable/ic_bug_report_24dp.xml | 9 - .../drawable/ic_compare_arrows_black_24dp.xml | 9 - .../src/main/res/drawable/ic_crop_24dp.xml | 9 - .../src/main/res/drawable/ic_directions.xml | 9 - .../src/main/res/drawable/ic_dns_24dp.xml | 9 - .../main/res/drawable/ic_dynamic_marker.xml | 9 - .../drawable/ic_filter_center_focus_24dp.xml | 9 - .../main/res/drawable/ic_filter_none_24dp.xml | 9 - .../res/drawable/ic_find_replace_24dp.xml | 9 - .../res/drawable/ic_flip_to_back_24dp.xml | 9 - .../res/drawable/ic_flip_to_front_24dp.xml | 9 - .../main/res/drawable/ic_gps_fixed_24dp.xml | 9 - .../res/drawable/ic_infowindow_adapter.xml | 9 - .../res/drawable/ic_infowindow_concurrent.xml | 9 - .../src/main/res/drawable/ic_location.xml | 9 - .../src/main/res/drawable/ic_map_padding.xml | 9 - .../src/main/res/drawable/ic_mapboxmap.xml | 9 - .../src/main/res/drawable/ic_menu_24dp.xml | 9 - .../main/res/drawable/ic_navigation_24dp.xml | 9 - .../res/drawable/ic_now_wallpaper_24dp.xml | 9 - .../main/res/drawable/ic_now_widgets_24dp.xml | 9 - .../main/res/drawable/ic_pin_drop_24dp.xml | 9 - .../src/main/res/drawable/ic_place_24dp.xml | 9 - .../src/main/res/drawable/ic_tilt.xml | 9 - .../main/res/drawable/ic_transform_24dp.xml | 9 - .../main/res/drawable/ic_trending_up_24dp.xml | 9 - .../layout/activity_animate_coordinate.xml | 48 ---- .../res/layout/activity_camera_position.xml | 36 +++ .../main/res/layout/activity_mapboxmap.xml | 24 -- .../res/layout/activity_press_for_marker.xml | 15 - .../src/main/res/layout/activity_tilt.xml | 24 -- .../res/layout/dialog_camera_position.xml | 202 ++++++++++++++ .../src/main/res/values/strings.xml | 75 +++-- 50 files changed, 498 insertions(+), 1560 deletions(-) delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CameraActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CoordinateChangeActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/DoubleMapActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityScreenTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MapboxMapActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/PressForMarkerActivityTest.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/TiltActivityTest.java create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/CameraPositionActivity.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/CoordinateChangeActivity.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/DoubleMapActivity.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/PressForMarkerActivity.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/TiltActivity.java delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_blur_on_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_bug_report_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_compare_arrows_black_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_crop_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dns_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_center_focus_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_none_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_find_replace_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_back_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_front_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_gps_fixed_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_adapter.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_concurrent.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_mapboxmap.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_menu_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_navigation_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_wallpaper_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_widgets_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_pin_drop_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_place_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_tilt.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_transform_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_trending_up_24dp.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animate_coordinate.xml create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml delete mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_tilt.xml create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/dialog_camera_position.xml diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CameraActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CameraActivityTest.java deleted file mode 100644 index 07158f708..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CameraActivityTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.app.Activity; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.activity.CameraAnimationTypeActivity; -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Tests on CameraAnimationTypeActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class CameraActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>(CameraAnimationTypeActivity.class); - - private Activity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.cameraMapView); - } -} - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CoordinateChangeActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CoordinateChangeActivityTest.java deleted file mode 100644 index 9d5218ea8..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/CoordinateChangeActivityTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.app.Activity; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.activity.CoordinateChangeActivity; -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Tests on CameraAnimationTypeActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class CoordinateChangeActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>(CoordinateChangeActivity.class); - - private Activity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.mapView); - } -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/DoubleMapActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/DoubleMapActivityTest.java deleted file mode 100644 index fc0edc8b5..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/DoubleMapActivityTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.app.Activity; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.activity.DoubleMapActivity; -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Tests on DoubleMapActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class DoubleMapActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>(DoubleMapActivity.class); - - private Activity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.mapView); - checkViewIsDisplayed(R.id.mini_map); - } -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityScreenTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityScreenTest.java deleted file mode 100644 index 65042985a..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityScreenTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.FeatureOverviewActivity; -import com.mapbox.mapboxsdk.testapp.R; -import com.mapbox.mapboxsdk.testapp.espresso.utils.DrawerUtils; -import com.mapbox.mapboxsdk.testapp.espresso.utils.GestureUtils; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -import static android.support.test.espresso.matcher.ViewMatchers.withId; - -/** - * Tests on FeatureOverviewActivity with screenshots - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class MainActivityScreenTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>( - FeatureOverviewActivity.class); - - private FeatureOverviewActivity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.mainMapView); - } - - @Test - public void testStyleEmerald() { - DrawerUtils.openDrawer(); - DrawerUtils.clickItem(R.string.styleEmerald); - GestureUtils.doubleClickGesture(R.id.mainMapView); - GestureUtils.doubleClickGesture(R.id.mainMapView); - takeNamedScreenshot(mActivity, "testEmeraldStyle"); - } - - @Test - public void testStyleStreets() { - DrawerUtils.openDrawer(); - DrawerUtils.clickItem(R.string.styleMapboxStreets); - GestureUtils.doubleClickGesture(R.id.mainMapView); - GestureUtils.doubleClickGesture(R.id.mainMapView); - takeNamedScreenshot(mActivity, "testStreetsStyle"); - } - - @Test - public void testStyleDark() { - DrawerUtils.openDrawer(); - DrawerUtils.clickItem(R.string.styleDark); - GestureUtils.doubleClickGesture(R.id.mainMapView); - GestureUtils.doubleClickGesture(R.id.mainMapView); - takeNamedScreenshot(mActivity, "testDarkStyle"); - } - - @Test - public void testStyleLight() { - DrawerUtils.openDrawer(); - DrawerUtils.clickItem(R.string.styleLight); - GestureUtils.doubleClickGesture(R.id.mainMapView); - GestureUtils.doubleClickGesture(R.id.mainMapView); - takeNamedScreenshot(mActivity, "testLightStyle"); - } - - @Test - public void testStyleSatellite() { - DrawerUtils.openDrawer(); - DrawerUtils.clickItem(R.string.styleSatellite); - GestureUtils.doubleClickGesture(R.id.mainMapView); - GestureUtils.doubleClickGesture(R.id.mainMapView); - takeNamedScreenshot(mActivity, "testSatelliteStyle"); - } - -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityTest.java deleted file mode 100644 index 244a8d2d7..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MainActivityTest.java +++ /dev/null @@ -1,260 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.FeatureOverviewActivity; -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.click; -import static android.support.test.espresso.action.ViewActions.doubleClick; -import static android.support.test.espresso.action.ViewActions.longClick; -import static android.support.test.espresso.assertion.ViewAssertions.matches; -import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; -import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription; -import static android.support.test.espresso.matcher.ViewMatchers.withId; -import static android.support.test.espresso.matcher.ViewMatchers.withText; -import static org.hamcrest.Matchers.not; - -/** - * Tests on FeatureOverviewActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class MainActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>( - FeatureOverviewActivity.class); - - private FeatureOverviewActivity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - /* - * Note that we need to keep the `test` prefix if we want to be able to run these - * tests on AWS Device Farm, annotations are not enough: - * https://github.com/awslabs/aws-device-farm-sample-app-for-android/issues/5#issuecomment-138258444 - */ - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.mainMapView); - } - - /* - * Check UI ids are visible - */ - - @Test - public void testDrawerLayoutIsDisplayed() { - onView(withId(R.id.drawer_layout)) - .check(matches(isDisplayed())); - } - - @Test - public void testToolbarIsDisplayed() { - onView(withId(R.id.toolbar)) - .check(matches(isDisplayed())); - } - - @Test - public void testContentFrameIsDisplayed() { - onView(withId(R.id.content_frame)) - .check(matches(isDisplayed())); - } - - @Test - public void testViewFpsIsDisplayed() { - // By default, R.id.view_fps is not displayed - onView(withId(R.id.view_fps)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testLocationFABIsDisplayed() { - onView(withId(R.id.locationFAB)) - .check(matches(isDisplayed())); - } - - @Test - public void testNavViewIsNotDisplayed() { - // By default, nav_view not displayed - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewIsDisplayed() { - // However, it's displayed when we click the home icon - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withId(R.id.nav_view)) - .check(matches(isDisplayed())); - } - - /* - * Some more tests on the map view (clicks, gestures) - */ - - @Test - public void testClickMap() { - onView(withId(R.id.mainMapView)) - .perform(click()) - .check(matches(isDisplayed())); - } - - @Test - public void testDoubleClickMap() { - onView(withId(R.id.mainMapView)) - .perform(doubleClick()) - .check(matches(isDisplayed())); - } - - @Test - public void testLongClickMap() { - onView(withId(R.id.mainMapView)) - .perform(longClick()) - .check(matches(isDisplayed())); - } - - /* - * Test the main drawer options - */ - - @Test - public void testNavViewActionDebug() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.action_debug)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewActionPointAnnotations() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.action_point_annotations)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewActionCompass() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.action_compass)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewStyleMapboxStreets() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.styleMapboxStreets)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewStyleEmerald() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.styleEmerald)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewStyleLight() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.styleLight)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewStyleDark() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.styleDark)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - @Test - public void testNavViewStyleSatellite() { - onView(withContentDescription(HOME_BUTTON_STRING)) - .perform(click()); - onView(withText(R.string.styleSatellite)) - .perform(click()); - - // Clicking the item closes the drawer - onView(withId(R.id.nav_view)) - .check(matches(not(isDisplayed()))); - } - - /* - * We can also check the map inner elements are visible - */ - - @Test - public void testMapIconContentDescription() { - // Mapbox logo - onView(withContentDescription(mActivity.getResources() - .getString(R.string.mapboxIconContentDescription))) - .check(matches(isDisplayed())); - } - -// @Test -// public void testMapCompassContentDescription() { -// //FIXME this is currently broken hence compass view is only being showed when rotating the map -// // Map compass -//// onView(withContentDescription(mActivity.getResources() -//// .getString(R.string.compassContentDescription))) -//// .check(matches(isDisplayed())); -// } - - @Test - public void testMapAttributionsIconContentDescription() { - // Attribution icon - onView(withContentDescription(mActivity.getResources() - .getString(R.string.attributionsIconContentDescription))) - .check(matches(isDisplayed())); - } - -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MapboxMapActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MapboxMapActivityTest.java deleted file mode 100644 index dffb80954..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MapboxMapActivityTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.app.Activity; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Tests on MapboxMapActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class MapboxMapActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>(MapboxMapActivity.class); - - private Activity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.mapView); - } -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MaxMinZoomActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MaxMinZoomActivityTest.java index c6a6cd292..cdd13789c 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MaxMinZoomActivityTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/MaxMinZoomActivityTest.java @@ -32,6 +32,6 @@ public class MaxMinZoomActivityTest extends BaseTest { @Test public void testSanity() { - checkViewIsDisplayed(R.id.manualZoomMapView); + checkViewIsDisplayed(R.id.mapView); } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/PressForMarkerActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/PressForMarkerActivityTest.java deleted file mode 100644 index 6acb88ec7..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/PressForMarkerActivityTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import com.mapbox.mapboxsdk.testapp.activity.PressForMarkerActivity; -import com.mapbox.mapboxsdk.testapp.R; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Tests on PressForMarkerActivity - */ -@RunWith(AndroidJUnit4.class) -@LargeTest -public class PressForMarkerActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>( - PressForMarkerActivity.class); - - private PressForMarkerActivity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - // we are adding mapview on the fly.. just validating if we have a toolbar - checkViewIsDisplayed(R.id.secondToolBar); - } -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/TiltActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/TiltActivityTest.java deleted file mode 100644 index d49e03326..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/espresso/TiltActivityTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.espresso; - -import android.support.test.rule.ActivityTestRule; - -import com.mapbox.mapboxsdk.testapp.R; -import com.mapbox.mapboxsdk.testapp.activity.TiltActivity; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; - -public class TiltActivityTest extends BaseTest { - - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>( - TiltActivity.class); - - private TiltActivity mActivity = null; - - @Before - public void setActivity() { - mActivity = mActivityRule.getActivity(); - } - - @Test - public void testSanity() { - checkViewIsDisplayed(R.id.tiltMapView); - } - -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/robotium/BaseMainActivityTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/robotium/BaseMainActivityTest.java index 0fca07ffb..85a27756b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/robotium/BaseMainActivityTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/robotium/BaseMainActivityTest.java @@ -7,24 +7,25 @@ import com.mapbox.mapboxsdk.maps.MapboxMap; import com.mapbox.mapboxsdk.maps.MapboxMapUtils; import com.mapbox.mapboxsdk.testapp.FeatureOverviewActivity; import com.mapbox.mapboxsdk.testapp.R; +import com.mapbox.mapboxsdk.testapp.activity.PolylineActivity; import com.robotium.solo.Solo; import org.junit.Test; -public abstract class BaseMainActivityTest extends ActivityInstrumentationTestCase2 { +public abstract class BaseMainActivityTest extends ActivityInstrumentationTestCase2 { protected Solo solo; protected MapView mapView; protected MapboxMap mapboxMap; public BaseMainActivityTest() { - super(FeatureOverviewActivity.class); + super(PolylineActivity.class); } @Override public void setUp() throws Exception { solo = new Solo(getInstrumentation(), getActivity()); - mapView = (MapView) solo.getView(R.id.mainMapView); + mapView = (MapView) solo.getView(R.id.mapView); mapboxMap = MapboxMapUtils.getMapboxMap(mapView); } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml index e2a5aa992..a014423e6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml @@ -23,14 +23,7 @@ - - - + + android:value="@string/category_annotation" /> + + + + android:name=".activity.CameraPositionActivity" + android:description="@string/description_cameraposition" + android:label="@string/activity_camera_position"> + + + @@ -88,18 +97,10 @@ android:name="@string/category" android:value="@string/category_fragment" /> - - - + android:description="@string/description_camera_zoom" + android:label="@string/activity_camera_zoom"> @@ -126,15 +127,7 @@ android:label="@string/activity_polyline"> - - - + android:value="@string/category_annotation" /> - - - + android:value="@string/category_annotation" /> - - - + mMarkerList; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_press_for_marker); - - Toolbar toolbar = (Toolbar) findViewById(R.id.secondToolBar); - setSupportActionBar(toolbar); - - ActionBar actionBar = getSupportActionBar(); - if (actionBar != null) { - actionBar.setDisplayHomeAsUpEnabled(true); - actionBar.setDisplayShowHomeEnabled(true); - } - - // Initial MapboxMap configuration - MapboxMapOptions options = new MapboxMapOptions(); - options.accessToken(getString(R.string.mapbox_access_token)); - options.styleUrl(Style.EMERALD); - options.camera(new CameraPosition.Builder() - .target(new LatLng(45.1855569, 5.7215506)) - .zoom(11) - .build()); - - // Create MapView programmatically - mMapView = new MapView(this, options); - - // Add MapView to ViewGroup - ((ViewGroup) findViewById(R.id.activity_container)).addView(mMapView); - - // Lifecycle method - mMapView.onCreate(savedInstanceState); - - // Handle saved state - if (savedInstanceState != null) { - mMarkerList = savedInstanceState.getParcelableArrayList(STATE_MARKER_LIST); - } else { - mMarkerList = new ArrayList<>(); - } - - // Get MapboxMap - mMapView.getMapAsync(new OnMapReadyCallback() { - @Override - public void onMapReady(@NonNull MapboxMap mapboxMap) { - mMapboxMap = mapboxMap; - - // add markers - mapboxMap.addMarkers(mMarkerList); - - // set map long click listeners - mapboxMap.setOnMapLongClickListener(PressForMarkerActivity.this); - } - }); - } - - @Override - public void onMapLongClick(@NonNull LatLng point) { - PointF pixel = mMapboxMap.getProjection().toScreenLocation(point); - String title = LAT_LON_FORMATTER.format(point.getLatitude()) + ", " + LAT_LON_FORMATTER.format(point.getLongitude()); - String snippet = "X = " + (int) pixel.x + ", Y = " + (int) pixel.y; - - MarkerOptions marker = new MarkerOptions() - .position(point) - .title(title) - .snippet(snippet); - - mMarkerList.add(marker); - mMapboxMap.addMarker(marker); - } - - @Override - protected void onStart() { - super.onStart(); - mMapView.onStart(); - } - - @Override - public void onResume() { - super.onResume(); - mMapView.onResume(); - } - - @Override - public void onPause() { - super.onPause(); - mMapView.onPause(); - } - - @Override - protected void onSaveInstanceState(Bundle outState) { - super.onSaveInstanceState(outState); - mMapView.onSaveInstanceState(outState); - outState.putParcelableArrayList(STATE_MARKER_LIST, (ArrayList) mMarkerList); - } - - @Override - protected void onStop() { - super.onStop(); - mMapView.onStop(); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - mMapView.onDestroy(); - } - - @Override - public void onLowMemory() { - super.onLowMemory(); - mMapView.onLowMemory(); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - onBackPressed(); - return true; - default: - return super.onOptionsItemSelected(item); - } - } -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/TiltActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/TiltActivity.java deleted file mode 100644 index f08f62bb8..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/TiltActivity.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.mapbox.mapboxsdk.testapp.activity; - -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.MenuItem; - -import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; -import com.mapbox.mapboxsdk.maps.MapView; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; -import com.mapbox.mapboxsdk.testapp.R; -import com.mapbox.mapboxsdk.testapp.utils.ApiAccess; - -public class TiltActivity extends AppCompatActivity { - - private MapView mMapView; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_tilt); - - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - ActionBar actionBar = getSupportActionBar(); - if (actionBar != null) { - actionBar.setDisplayHomeAsUpEnabled(true); - actionBar.setDisplayShowHomeEnabled(true); - } - - mMapView = (MapView) findViewById(R.id.tiltMapView); - mMapView.setAccessToken(ApiAccess.getToken(this)); - mMapView.onCreate(savedInstanceState); - mMapView.getMapAsync(new OnMapReadyCallback() { - @Override - public void onMapReady(@NonNull MapboxMap mapboxMap) { - // initial position has been set in R.layout.activity_tilt - CameraPosition tiltedCameraPosition = new CameraPosition.Builder().tilt(45.0f).build(); - mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(tiltedCameraPosition), 10000); - } - }); - } - - @Override - protected void onStart() { - super.onStart(); - mMapView.onStart(); - } - - @Override - protected void onStop() { - super.onStop(); - mMapView.onStop(); - } - - @Override - public void onPause() { - super.onPause(); - mMapView.onPause(); - } - - @Override - public void onResume() { - super.onResume(); - mMapView.onResume(); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - mMapView.onDestroy(); - } - - @Override - protected void onSaveInstanceState(Bundle outState) { - super.onSaveInstanceState(outState); - mMapView.onSaveInstanceState(outState); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - onBackPressed(); - return true; - default: - return super.onOptionsItemSelected(item); - } - } - -} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_blur_on_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_blur_on_24dp.xml deleted file mode 100644 index b032703e3..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_blur_on_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_bug_report_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_bug_report_24dp.xml deleted file mode 100644 index 909e11f92..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_bug_report_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_compare_arrows_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_compare_arrows_black_24dp.xml deleted file mode 100644 index 23417034d..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_compare_arrows_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_crop_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_crop_24dp.xml deleted file mode 100644 index 4f72bed69..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_crop_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions.xml deleted file mode 100644 index 2c474849a..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dns_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dns_24dp.xml deleted file mode 100644 index 5b7b1bce6..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dns_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml deleted file mode 100644 index e16f6b317..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_center_focus_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_center_focus_24dp.xml deleted file mode 100644 index 455c18f3d..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_center_focus_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_none_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_none_24dp.xml deleted file mode 100644 index 9b16b1557..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_filter_none_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_find_replace_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_find_replace_24dp.xml deleted file mode 100644 index 26bb56ca5..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_find_replace_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_back_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_back_24dp.xml deleted file mode 100644 index da636f975..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_back_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_front_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_front_24dp.xml deleted file mode 100644 index 7d7863859..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_flip_to_front_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_gps_fixed_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_gps_fixed_24dp.xml deleted file mode 100644 index a8fa0207e..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_gps_fixed_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_adapter.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_adapter.xml deleted file mode 100644 index 0d4c724aa..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_adapter.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_concurrent.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_concurrent.xml deleted file mode 100644 index 9b16b1557..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_infowindow_concurrent.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location.xml deleted file mode 100644 index 027a64472..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml deleted file mode 100644 index 60b75a549..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_mapboxmap.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_mapboxmap.xml deleted file mode 100644 index 3482fa9db..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_mapboxmap.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_menu_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_menu_24dp.xml deleted file mode 100644 index 8c16289f2..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_menu_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_navigation_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_navigation_24dp.xml deleted file mode 100644 index 6ab15dc6b..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_navigation_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_wallpaper_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_wallpaper_24dp.xml deleted file mode 100644 index 1b885337d..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_wallpaper_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_widgets_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_widgets_24dp.xml deleted file mode 100644 index 9329bfc67..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_now_widgets_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_pin_drop_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_pin_drop_24dp.xml deleted file mode 100644 index 47aff9953..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_pin_drop_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_place_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_place_24dp.xml deleted file mode 100644 index e778c37c4..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_place_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_tilt.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_tilt.xml deleted file mode 100644 index d5c67efbb..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_tilt.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_transform_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_transform_24dp.xml deleted file mode 100644 index b8448abb1..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_transform_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_trending_up_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_trending_up_24dp.xml deleted file mode 100644 index 830f3036f..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_trending_up_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animate_coordinate.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animate_coordinate.xml deleted file mode 100644 index c012c2a6d..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animate_coordinate.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml new file mode 100644 index 000000000..2e08f79e9 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml deleted file mode 100644 index eccd3ea8e..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml deleted file mode 100644 index 39ff128c6..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_tilt.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_tilt.xml deleted file mode 100644 index eae320c75..000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_tilt.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/dialog_camera_position.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/dialog_camera_position.xml new file mode 100644 index 000000000..c1ffa7d20 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/dialog_camera_position.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 1f6e3a175..564a5a509 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -7,68 +7,65 @@ MapboxMap Activity - Support Map Fragment Activity - Map Fragment Activity + Support Map Fragment + Map Fragment - - Press For Marker Activity - Add Bulk Markers Activity - Add Markers In Bulk Activity + + Add Markers + Animated Marker (experimental) + Dynamic Marker + Polyline - Basic InfoWindow example + Standard InfoWindow example Custom InfoWindow Adapter - Manual Zoom Activity - Visible Coordinate Bounds Activity - Map Tilt Activity + Animation Types + Zoom Methods + LatLngBounds Method + CameraPosition Method Scroll By Method - - User tracking mode Activity - Camera Animation Types - Polyline Activity - Animate Coordinate Change Activity - Custom Layer Activity - Directions Activity - Geocoder Activity - Double Map Activity - Dynamic Marker Activity - Map Padding Activity - Offline Map Activity - Min/Max Zoom Activity - Animated Marker Activity + + Directions + Geocoder + + User tracking mode + Custom Layer (experimental) + Map Padding + Offline Map + Min/Max Zoom + + Tracks the location of the user - Add a custom layer, experimental feature - Test out MapboxMap interaction + Experimental feature Learn how to create a custom InfoWindow - Showcasing Tilt + CameraPosition capabilities Showcase MapFragment Showcase SupportMapFragment - Add marker on long press - Different types of zoom in CameraUpdateFactory + Example how to add a marker to a Map + Different types of zoom methods Configure a max and min zoomlevel - Learn how to handle the basic InfoWindow - Animate Coordinate Change + Learn how to handle the InfoWindow InfoWindow example with multiple open - Example which adds Markers in bulk + Add Markers to a Map Showcase the different animation types - Limit Visible Bounds example - Having 2 MapViews in one location - Dynamic Marker example + Center the camera around a bounds + Update position and icon Map Padding example Offline Map example - Animated Marker example + Animate the position change of a Marker Add a polyline example Example with Directions API Example with Geocoder API - Example to scroll with pixels in x,y direction + Scroll with pixels in x,y direction Concurrent Open InfoWindows - Marker + category + Annotation InfoWindow Camera Fragment @@ -122,6 +119,6 @@ Download region List regions - category + Animate to new position