[android] #4365 - reworked some samples, resources and tests
This commit is contained in:
@@ -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<CameraAnimationTypeActivity> mActivityRule = new ActivityTestRule<>(CameraAnimationTypeActivity.class);
|
||||
|
||||
private Activity mActivity = null;
|
||||
|
||||
@Before
|
||||
public void setActivity() {
|
||||
mActivity = mActivityRule.getActivity();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSanity() {
|
||||
checkViewIsDisplayed(R.id.cameraMapView);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<CoordinateChangeActivity> mActivityRule = new ActivityTestRule<>(CoordinateChangeActivity.class);
|
||||
|
||||
private Activity mActivity = null;
|
||||
|
||||
@Before
|
||||
public void setActivity() {
|
||||
mActivity = mActivityRule.getActivity();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSanity() {
|
||||
checkViewIsDisplayed(R.id.mapView);
|
||||
}
|
||||
}
|
||||
@@ -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<DoubleMapActivity> 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);
|
||||
}
|
||||
}
|
||||
@@ -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<FeatureOverviewActivity> 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");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<FeatureOverviewActivity> 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()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<MapboxMapActivity> mActivityRule = new ActivityTestRule<>(MapboxMapActivity.class);
|
||||
|
||||
private Activity mActivity = null;
|
||||
|
||||
@Before
|
||||
public void setActivity() {
|
||||
mActivity = mActivityRule.getActivity();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSanity() {
|
||||
checkViewIsDisplayed(R.id.mapView);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,6 @@ public class MaxMinZoomActivityTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
public void testSanity() {
|
||||
checkViewIsDisplayed(R.id.manualZoomMapView);
|
||||
checkViewIsDisplayed(R.id.mapView);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<PressForMarkerActivity> 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);
|
||||
}
|
||||
}
|
||||
@@ -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<TiltActivity> mActivityRule = new ActivityTestRule<>(
|
||||
TiltActivity.class);
|
||||
|
||||
private TiltActivity mActivity = null;
|
||||
|
||||
@Before
|
||||
public void setActivity() {
|
||||
mActivity = mActivityRule.getActivity();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSanity() {
|
||||
checkViewIsDisplayed(R.id.tiltMapView);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<FeatureOverviewActivity> {
|
||||
public abstract class BaseMainActivityTest extends ActivityInstrumentationTestCase2<PolylineActivity> {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,7 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.LatLngBoundsActivity"
|
||||
android:description="@string/description_visible_bounds"
|
||||
android:label="@string/activity_visible_coordinate_bounds">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_other" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".activity.InfoWindowActivity"
|
||||
android:description="@string/description_info_window"
|
||||
@@ -54,7 +47,15 @@
|
||||
android:label="@string/activity_add_bulk_markers">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_marker" />
|
||||
android:value="@string/category_annotation" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.AnimatedMarkerActivity"
|
||||
android:description="@string/description_animated_marker"
|
||||
android:label="@string/activity_animated_marker">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_annotation" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.CameraAnimationTypeActivity"
|
||||
@@ -65,9 +66,17 @@
|
||||
android:value="@string/category_camera" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.TiltActivity"
|
||||
android:description="@string/description_tilt"
|
||||
android:label="@string/activity_tilt">
|
||||
android:name=".activity.CameraPositionActivity"
|
||||
android:description="@string/description_cameraposition"
|
||||
android:label="@string/activity_camera_position">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_camera" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.LatLngBoundsActivity"
|
||||
android:description="@string/description_visible_bounds"
|
||||
android:label="@string/activity_visible_coordinate_bounds">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_camera" />
|
||||
@@ -88,18 +97,10 @@
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_fragment" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.PressForMarkerActivity"
|
||||
android:description="@string/description_press_for_marker"
|
||||
android:label="@string/activity_press_for_marker">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_marker" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.ManualZoomActivity"
|
||||
android:description="@string/description_manual_zoom"
|
||||
android:label="@string/activity_manual_zoom">
|
||||
android:description="@string/description_camera_zoom"
|
||||
android:label="@string/activity_camera_zoom">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_camera" />
|
||||
@@ -126,15 +127,7 @@
|
||||
android:label="@string/activity_polyline">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_marker" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.CoordinateChangeActivity"
|
||||
android:description="@string/description_animate_coordinate_change"
|
||||
android:label="@string/activity_animate_coordinate_change">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_camera" />
|
||||
android:value="@string/category_annotation" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.DirectionsActivity"
|
||||
@@ -152,14 +145,6 @@
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_api" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.DoubleMapActivity"
|
||||
android:description="@string/description_double_mapview"
|
||||
android:label="@string/activity_double_map">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_other" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.ScrollByActivity"
|
||||
android:description="@string/description_scroll_by"
|
||||
@@ -174,7 +159,7 @@
|
||||
android:label="@string/activity_dynamic_marker">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_marker" />
|
||||
android:value="@string/category_annotation" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.MapPaddingActivity"
|
||||
@@ -193,14 +178,7 @@
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_other" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.AnimatedMarkerActivity"
|
||||
android:description="@string/description_animated_marker"
|
||||
android:label="@string/activity_animated_marker">
|
||||
<meta-data
|
||||
android:name="@string/category"
|
||||
android:value="@string/category_marker" />
|
||||
</activity>
|
||||
|
||||
|
||||
<!-- Configuration Settings -->
|
||||
<meta-data
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.mapbox.mapboxsdk.testapp.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.IdRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.MapboxConstants;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
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;
|
||||
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
public class CameraPositionActivity extends AppCompatActivity implements OnMapReadyCallback {
|
||||
|
||||
private MapView mapView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_camera_position);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
}
|
||||
|
||||
mapView = (MapView) findViewById(R.id.mapView);
|
||||
mapView.setAccessToken(ApiAccess.getToken(this));
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(@NonNull final MapboxMap mapboxMap) {
|
||||
// add a listener to FAB
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setColorFilter(ContextCompat.getColor(CameraPositionActivity.this, R.color.primary));
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Context context = v.getContext();
|
||||
final View dialogContent = LayoutInflater.from(context).inflate(R.layout.dialog_camera_position, null);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context, com.mapbox.mapboxsdk.R.style.AttributionAlertDialogStyle);
|
||||
builder.setTitle(R.string.dialog_camera_position);
|
||||
builder.setView(onInflateDialogContent(dialogContent));
|
||||
builder.setPositiveButton("Animate", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
double latitude = Double.parseDouble(((TextView) dialogContent.findViewById(R.id.value_lat)).getText().toString());
|
||||
double longitude = Double.parseDouble(((TextView) dialogContent.findViewById(R.id.value_lon)).getText().toString());
|
||||
double zoom = Double.parseDouble(((TextView) dialogContent.findViewById(R.id.value_zoom)).getText().toString());
|
||||
double bearing = Double.parseDouble(((TextView) dialogContent.findViewById(R.id.value_bearing)).getText().toString());
|
||||
double tilt = Double.parseDouble(((TextView) dialogContent.findViewById(R.id.value_tilt)).getText().toString());
|
||||
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder()
|
||||
.target(new LatLng(latitude, longitude))
|
||||
.zoom(zoom)
|
||||
.bearing(bearing)
|
||||
.tilt(tilt)
|
||||
.build();
|
||||
|
||||
mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 5000);
|
||||
Log.v(MapboxConstants.TAG, cameraPosition.toString());
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Cancel", null);
|
||||
builder.setCancelable(false);
|
||||
builder.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
mapView.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mapView.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mapView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mapView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mapView.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mapView.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
onBackPressed();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
private View onInflateDialogContent(View view) {
|
||||
linkTextView(view, R.id.value_lat, R.id.seekbar_lat, new LatLngChangeListener(), 180 + 38);
|
||||
linkTextView(view, R.id.value_lon, R.id.seekbar_lon, new LatLngChangeListener(), 180 - 77);
|
||||
linkTextView(view, R.id.value_zoom, R.id.seekbar_zoom, new ValueChangeListener(), 6);
|
||||
linkTextView(view, R.id.value_bearing, R.id.seekbar_bearing, new ValueChangeListener(), 90);
|
||||
linkTextView(view, R.id.value_tilt, R.id.seekbar_tilt, new ValueChangeListener(), 40);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void linkTextView(View view, @IdRes int textViewRes, @IdRes int seekBarRes, ValueChangeListener listener, int defaultValue) {
|
||||
final TextView value = (TextView) view.findViewById(textViewRes);
|
||||
SeekBar seekBar = (SeekBar) view.findViewById(seekBarRes);
|
||||
listener.setLinkedValueView(value);
|
||||
seekBar.setOnSeekBarChangeListener(listener);
|
||||
seekBar.setProgress(defaultValue);
|
||||
}
|
||||
|
||||
private class ValueChangeListener implements SeekBar.OnSeekBarChangeListener {
|
||||
|
||||
protected TextView textView;
|
||||
|
||||
public void setLinkedValueView(TextView textView) {
|
||||
this.textView = textView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
textView.setText(String.valueOf(progress));
|
||||
}
|
||||
}
|
||||
|
||||
private class LatLngChangeListener extends ValueChangeListener {
|
||||
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
super.onProgressChanged(seekBar, progress - 180, fromUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
package com.mapbox.mapboxsdk.testapp.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.maps.UiSettings;
|
||||
import com.mapbox.mapboxsdk.testapp.R;
|
||||
import com.mapbox.mapboxsdk.testapp.utils.ApiAccess;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
public class CoordinateChangeActivity extends AppCompatActivity {
|
||||
|
||||
private MapView mMapView;
|
||||
private MapboxMap mMapboxMap;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_animate_coordinate);
|
||||
|
||||
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.mapView);
|
||||
mMapView.setTag(true);
|
||||
mMapView.setAccessToken(ApiAccess.getToken(this));
|
||||
mMapView.onCreate(savedInstanceState);
|
||||
mMapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
mMapboxMap = mapboxMap;
|
||||
UiSettings uiSettings = mapboxMap.getUiSettings();
|
||||
uiSettings.setCompassEnabled(false);
|
||||
}
|
||||
});
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setColorFilter(ContextCompat.getColor(this, R.color.primary));
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mMapboxMap != null) {
|
||||
mMapboxMap.animateCamera(CameraUpdateFactory.newLatLng(getNextLatLng()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private LatLng getNextLatLng() {
|
||||
boolean first = (boolean) mMapView.getTag();
|
||||
mMapView.setTag(!first);
|
||||
return first ? new LatLng(38.87000, -77.00800) : new LatLng(38.87031, -77.00897);
|
||||
}
|
||||
|
||||
@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 onStop() {
|
||||
super.onStop();
|
||||
mMapView.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mMapView.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,171 +0,0 @@
|
||||
package com.mapbox.mapboxsdk.testapp.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.MyLocationTracking;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.maps.TrackingSettings;
|
||||
import com.mapbox.mapboxsdk.maps.UiSettings;
|
||||
import com.mapbox.mapboxsdk.testapp.R;
|
||||
|
||||
public class DoubleMapActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG_FRAGMENT = "map";
|
||||
private DoubleMapFragment mMapFragment;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_map_fragment);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
}
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
transaction.add(R.id.fragment_container, mMapFragment = new DoubleMapFragment(), TAG_FRAGMENT);
|
||||
transaction.commit();
|
||||
} else {
|
||||
mMapFragment = (DoubleMapFragment) getSupportFragmentManager().findFragmentByTag(TAG_FRAGMENT);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DoubleMapFragment extends Fragment {
|
||||
|
||||
private MapView mMapView;
|
||||
private MapView mMapViewMini;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_double_map, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
// MapView large
|
||||
mMapView = (MapView) view.findViewById(R.id.mapView);
|
||||
mMapView.setStyleUrl(Style.DARK);
|
||||
mMapView.onCreate(savedInstanceState);
|
||||
mMapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(18));
|
||||
try {
|
||||
TrackingSettings settings = mapboxMap.getTrackingSettings();
|
||||
settings.setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);
|
||||
} catch (SecurityException e) {
|
||||
// permission is handled in FeatureOverviewActivity
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// MapView mini
|
||||
mMapViewMini = (MapView) view.findViewById(R.id.mini_map);
|
||||
mMapViewMini.setStyle(Style.LIGHT);
|
||||
mMapViewMini.onCreate(savedInstanceState);
|
||||
mMapViewMini.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(4));
|
||||
|
||||
UiSettings uiSettings = mapboxMap.getUiSettings();
|
||||
uiSettings.setAllGesturesEnabled(false);
|
||||
uiSettings.setCompassEnabled(false);
|
||||
uiSettings.setAttributionEnabled(false);
|
||||
uiSettings.setLogoEnabled(false);
|
||||
|
||||
try {
|
||||
TrackingSettings settings = mapboxMap.getTrackingSettings();
|
||||
settings.setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);
|
||||
}catch (SecurityException e){
|
||||
// permission is handled in FeatureOverviewActivity
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
mMapView.onStart();
|
||||
mMapViewMini.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mMapView.onResume();
|
||||
mMapViewMini.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mMapView.onPause();
|
||||
mMapViewMini.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
mMapView.onStop();
|
||||
mMapViewMini.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
mMapView.onDestroy();
|
||||
mMapViewMini.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
mMapView.onLowMemory();
|
||||
mMapViewMini.onLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mMapView.onSaveInstanceState(outState);
|
||||
mMapViewMini.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
onBackPressed();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
package com.mapbox.mapboxsdk.testapp.activity;
|
||||
|
||||
import android.graphics.PointF;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
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 android.view.ViewGroup;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.testapp.R;
|
||||
import com.mapbox.mapboxsdk.testapp.utils.ApiAccess;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PressForMarkerActivity extends AppCompatActivity implements MapboxMap.OnMapLongClickListener {
|
||||
|
||||
private static final DecimalFormat LAT_LON_FORMATTER = new DecimalFormat("#.#####");
|
||||
private static final String STATE_MARKER_LIST = "markerList";
|
||||
|
||||
private MapView mMapView;
|
||||
private MapboxMap mMapboxMap;
|
||||
private List<MarkerOptions> 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<MarkerOptions>) 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M6,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,4c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,-8c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm-3,0.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM6,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm15,5.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM14,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zm0,-3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zm-11,10c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zm7,7c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zm0,-17c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM10,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zm0,5.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zm8,0.5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,4c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,-8c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,-4c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm3,8.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM14,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm0,3.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zm-4,-12c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zm0,8.5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zm4,-4.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zm0,-4c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8H4v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1H4v2h2v1c0,0.34 0.04,0.67 0.09,1H4v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3H20v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1H20V8zm-6,8h-4v-2h4v2zm0,-4h-4v-2h4v2z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9.01,14L2,14v2h7.01v3L13,15l-3.99,-4v3zM14.99,13v-3L22,10L22,8h-7.01L14.99,5L11,9l3.99,4z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M17,15h2V7c0,-1.1 -0.9,-2 -2,-2H9v2h8v8zM7,17V1H5v4H1v2h4v10c0,1.1 0.9,2 2,2h10v4h2v-4h4v-2H7z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M21.71,11.29l-9,-9c-0.39,-0.39 -1.02,-0.39 -1.41,0l-9,9c-0.39,0.39 -0.39,1.02 0,1.41l9,9c0.39,0.39 1.02,0.39 1.41,0l9,-9c0.39,-0.38 0.39,-1.01 0,-1.41zM14,14.5V12h-4v3H8v-4c0,-0.55 0.45,-1 1,-1h5V7.5l3.5,3.5 -3.5,3.5z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M20,13H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-6c0,-0.55 -0.45,-1 -1,-1zM7,19c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM20,3H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1V4c0,-0.55 -0.45,-1 -1,-1zM7,9c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3H5v6h2V7zm10,10H7v-3l-4,4 4,4v-3h12v-6h-2v4zm-4,-2V9h-1l-2,1v1h1.5v4H13z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M5,15H3v4c0,1.1 0.9,2 2,2h4v-2H5v-4zM5,5h4V3H5c-1.1,0 -2,0.9 -2,2v4h2V5zm14,-2h-4v2h4v4h2V5c0,-1.1 -0.9,-2 -2,-2zm0,16h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,5H1v16c0,1.1 0.9,2 2,2h16v-2H3V5zm18,-4H7c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-2 -2,-2zm0,16H7V3h14v14z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,6c1.38,0 2.63,0.56 3.54,1.46L12,10h6V4l-2.05,2.05C14.68,4.78 12.93,4 11,4c-3.53,0 -6.43,2.61 -6.92,6H6.1c0.46,-2.28 2.48,-4 4.9,-4zm5.64,9.14c0.66,-0.9 1.12,-1.97 1.28,-3.14H15.9c-0.46,2.28 -2.48,4 -4.9,4 -1.38,0 -2.63,-0.56 -3.54,-1.46L10,12H4v6l2.05,-2.05C7.32,17.22 9.07,18 11,18c1.55,0 2.98,-0.51 4.14,-1.36L20,21.49 21.49,20l-4.85,-4.86z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M9,7H7v2h2V7zm0,4H7v2h2v-2zm0,-8c-1.11,0 -2,0.9 -2,2h2V3zm4,12h-2v2h2v-2zm6,-12v2h2c0,-1.1 -0.9,-2 -2,-2zm-6,0h-2v2h2V3zM9,17v-2H7c0,1.1 0.89,2 2,2zm10,-4h2v-2h-2v2zm0,-4h2V7h-2v2zm0,8c1.1,0 2,-0.9 2,-2h-2v2zM5,7H3v12c0,1.1 0.89,2 2,2h12v-2H5V7zm10,-2h2V3h-2v2zm0,12h2v-2h-2v2z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,13h2v-2H3v2zm0,4h2v-2H3v2zm2,4v-2H3c0,1.1 0.89,2 2,2zM3,9h2V7H3v2zm12,12h2v-2h-2v2zm4,-18H9c-1.11,0 -2,0.9 -2,2v10c0,1.1 0.89,2 2,2h10c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2zm0,12H9V5h10v10zm-8,6h2v-2h-2v2zm-4,0h2v-2H7v2z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zm8.94,3c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94V1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11H1v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94V23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94H23v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,5H1v16c0,1.1 0.9,2 2,2h16v-2H3V5zm18,-4H7c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-2 -2,-2zm0,16H7V3h14v14z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zm0,9.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,11.55C9.64,9.35 6.48,8 3,8v11c3.48,0 6.64,1.35 9,3.55 2.36,-2.19 5.52,-3.55 9,-3.55V8c-3.48,0 -6.64,1.35 -9,3.55zM12,8c1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3 1.34,3 3,3z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,18h18v-2H3v2zm0,-5h18v-2H3v2zm0,-7v2h18V6H3z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,2L4.5,20.29l0.71,0.71L12,18l6.79,3 0.71,-0.71z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M4,4h7V2H4c-1.1,0 -2,0.9 -2,2v7h2V4zm6,9l-4,5h12l-3,-4 -2.03,2.71L10,13zm7,-4.5c0,-0.83 -0.67,-1.5 -1.5,-1.5S14,7.67 14,8.5s0.67,1.5 1.5,1.5S17,9.33 17,8.5zM20,2h-7v2h7v7h2V4c0,-1.1 -0.9,-2 -2,-2zm0,18h-7v2h7c1.1,0 2,-0.9 2,-2v-7h-2v7zM4,13H2v7c0,1.1 0.9,2 2,2h7v-2H4v-7z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M13,13v8h8v-8h-8zM3,21h8v-8H3v8zM3,3v8h8V3H3zm13.66,-1.31L11,7.34 16.66,13l5.66,-5.66 -5.66,-5.65z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M18,8c0,-3.31 -2.69,-6 -6,-6S6,4.69 6,8c0,4.5 6,11 6,11s6,-6.5 6,-11zm-8,0c0,-1.1 0.9,-2 2,-2s2,0.9 2,2 -0.89,2 -2,2c-1.1,0 -2,-0.9 -2,-2zM5,20v2h14v-2H5z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zm0,9.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M7.77,6.76L6.23,5.48 0.82,12l5.41,6.52 1.54,-1.28L3.42,12l4.35,-5.24zM7,13h2v-2H7v2zm10,-2h-2v2h2v-2zm-6,2h2v-2h-2v2zm6.77,-7.52l-1.54,1.28L20.58,12l-4.35,5.24 1.54,1.28L23.18,12l-5.41,-6.52z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M22,18v-2H8V4h2L7,1 4,4h2v2H2v2h4v8c0,1.1 0.9,2 2,2h8v2h-2l3,3 3,-3h-2v-2h4zM10,8h6v6h2V8c0,-1.1 -0.9,-2 -2,-2h-6v2z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M16,6l2.29,2.29 -4.88,4.88 -4,-4L2,16.59 3.41,18l6,-6 4,4 6.3,-6.29L22,12V6z" />
|
||||
</vector>
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/toolbar">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
app:center_latitude="38.87000"
|
||||
app:center_longitude="-77.00800"
|
||||
app:zoom="16"
|
||||
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_margin="@dimen/fab_margin"
|
||||
android:src="@drawable/ic_animate_coordinates"
|
||||
app:backgroundTint="@color/white" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:style_url="@string/style_mapbox_streets" />
|
||||
|
||||
<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_input_24dp"
|
||||
app:backgroundTint="@android:color/white" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:style_url="@string/style_mapbox_streets"
|
||||
app:center_latitude="38.897705003219784"
|
||||
app:center_longitude="-77.03655168667463"
|
||||
app:zoom="15" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/secondToolBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/tiltMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:center_latitude="38.90252"
|
||||
app:center_longitude="-77.02291"
|
||||
app:style_url="@string/style_mapbox_streets"
|
||||
app:zoom="11" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_lat"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:text="Latitude"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_lat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@+id/value_lat"
|
||||
android:layout_toRightOf="@id/text_lat"
|
||||
android:max="360" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/value_lat"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
android:text="-180"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_lon"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:text="Longitude" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_lon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@+id/value_lon"
|
||||
android:layout_toRightOf="@id/text_lon"
|
||||
android:max="360" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/value_lon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
android:text="-180" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_zoom"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:text="Zoom" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_zoom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@+id/value_zoom"
|
||||
android:layout_toRightOf="@id/text_zoom"
|
||||
android:max="18" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/value_zoom"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
android:text="18" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_bearing"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:text="Bearing" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_bearing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@+id/value_bearing"
|
||||
android:layout_toRightOf="@id/text_bearing"
|
||||
android:max="360" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/value_bearing"
|
||||
android:layout_width="48dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
android:text="0" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_tilt"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:text="Tilt" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_tilt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@+id/value_tilt"
|
||||
android:layout_toRightOf="@id/text_tilt"
|
||||
android:max="60" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/value_tilt"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
android:text="0" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -7,68 +7,65 @@
|
||||
<string name="activity_mapboxmap">MapboxMap Activity</string>
|
||||
|
||||
<!-- Fragment -->
|
||||
<string name="activity_map_fragment_suport">Support Map Fragment Activity</string>
|
||||
<string name="activity_map_fragment">Map Fragment Activity</string>
|
||||
<string name="activity_map_fragment_suport">Support Map Fragment</string>
|
||||
<string name="activity_map_fragment">Map Fragment</string>
|
||||
|
||||
<!-- Markers -->
|
||||
<string name="activity_press_for_marker">Press For Marker Activity</string>
|
||||
<string name="activity_marker_in_bulk">Add Bulk Markers Activity</string>
|
||||
<string name="activity_add_bulk_markers">Add Markers In Bulk Activity</string>
|
||||
<!-- Annotations -->
|
||||
<string name="activity_add_bulk_markers">Add Markers</string>
|
||||
<string name="activity_animated_marker">Animated Marker (experimental)</string>
|
||||
<string name="activity_dynamic_marker">Dynamic Marker</string>
|
||||
<string name="activity_polyline">Polyline</string>
|
||||
|
||||
<!-- InfoWindow-->
|
||||
<string name="activity_info_window">Basic InfoWindow example</string>
|
||||
<string name="activity_info_window">Standard InfoWindow example</string>
|
||||
<string name="activity_infowindow_adapter">Custom InfoWindow Adapter</string>
|
||||
|
||||
<!-- Camera -->
|
||||
<string name="activity_manual_zoom">Manual Zoom Activity</string>
|
||||
<string name="activity_visible_coordinate_bounds">Visible Coordinate Bounds Activity</string>
|
||||
<string name="activity_tilt">Map Tilt Activity</string>
|
||||
<string name="activity_camera_animation_types">Animation Types</string>
|
||||
<string name="activity_camera_zoom">Zoom Methods</string>
|
||||
<string name="activity_visible_coordinate_bounds">LatLngBounds Method</string>
|
||||
<string name="activity_camera_position">CameraPosition Method</string>
|
||||
<string name="activity_scroll_by">Scroll By Method</string>
|
||||
|
||||
<!-- Other -->
|
||||
<string name="activity_user_tracking_mode">User tracking mode Activity</string>
|
||||
<string name="activity_camera_animation_types">Camera Animation Types</string>
|
||||
<string name="activity_polyline">Polyline Activity</string>
|
||||
<string name="activity_animate_coordinate_change">Animate Coordinate Change Activity</string>
|
||||
<string name="activity_custom_layer">Custom Layer Activity</string>
|
||||
<string name="activity_directions">Directions Activity</string>
|
||||
<string name="activity_geocoder">Geocoder Activity</string>
|
||||
<string name="activity_double_map">Double Map Activity</string>
|
||||
<string name="activity_dynamic_marker">Dynamic Marker Activity</string>
|
||||
<string name="activity_map_padding">Map Padding Activity</string>
|
||||
<string name="activity_offline">Offline Map Activity</string>
|
||||
<string name="activity_minmax_zoom">Min/Max Zoom Activity</string>
|
||||
<string name="activity_animated_marker">Animated Marker Activity</string>
|
||||
<!-- API -->
|
||||
<string name="activity_directions">Directions</string>
|
||||
<string name="activity_geocoder">Geocoder</string>
|
||||
|
||||
<!-- Other -->
|
||||
<string name="activity_user_tracking_mode">User tracking mode</string>
|
||||
<string name="activity_custom_layer">Custom Layer (experimental)</string>
|
||||
<string name="activity_map_padding">Map Padding</string>
|
||||
<string name="activity_offline">Offline Map</string>
|
||||
<string name="activity_minmax_zoom">Min/Max Zoom</string>
|
||||
|
||||
<!-- Description -->
|
||||
<string name="description_user_location_tracking">Tracks the location of the user</string>
|
||||
<string name="description_custom_layer">Add a custom layer, experimental feature</string>
|
||||
<string name="description_mapboxmap">Test out MapboxMap interaction</string>
|
||||
<string name="description_custom_layer">Experimental feature</string>
|
||||
<string name="description_info_window_adapter">Learn how to create a custom InfoWindow</string>
|
||||
<string name="description_tilt">Showcasing Tilt</string>
|
||||
<string name="description_cameraposition">CameraPosition capabilities</string>
|
||||
<string name="description_map_fragment">Showcase MapFragment</string>
|
||||
<string name="description_map_fragment_support">Showcase SupportMapFragment</string>
|
||||
<string name="description_press_for_marker">Add marker on long press</string>
|
||||
<string name="description_manual_zoom">Different types of zoom in CameraUpdateFactory</string>
|
||||
<string name="description_press_for_marker">Example how to add a marker to a Map</string>
|
||||
<string name="description_camera_zoom">Different types of zoom methods</string>
|
||||
<string name="description_minmax_zoom">Configure a max and min zoomlevel</string>
|
||||
<string name="description_info_window">Learn how to handle the basic InfoWindow</string>
|
||||
<string name="description_animate_coordinate_change">Animate Coordinate Change</string>
|
||||
<string name="description_info_window">Learn how to handle the InfoWindow</string>
|
||||
<string name="description_info_window_concurrent">InfoWindow example with multiple open</string>
|
||||
<string name="description_add_bulk_markers">Example which adds Markers in bulk</string>
|
||||
<string name="description_add_bulk_markers">Add Markers to a Map</string>
|
||||
<string name="description_camera_animation_types">Showcase the different animation types</string>
|
||||
<string name="description_visible_bounds">Limit Visible Bounds example</string>
|
||||
<string name="description_double_mapview">Having 2 MapViews in one location</string>
|
||||
<string name="description_dynamic_marker">Dynamic Marker example</string>
|
||||
<string name="description_visible_bounds">Center the camera around a bounds</string>
|
||||
<string name="description_dynamic_marker">Update position and icon</string>
|
||||
<string name="description_map_padding">Map Padding example</string>
|
||||
<string name="description_offline">Offline Map example</string>
|
||||
<string name="description_animated_marker">Animated Marker example</string>
|
||||
<string name="description_animated_marker">Animate the position change of a Marker</string>
|
||||
<string name="description_polyline">Add a polyline example</string>
|
||||
<string name="description_directions">Example with Directions API</string>
|
||||
<string name="description_geocoder">Example with Geocoder API</string>
|
||||
<string name="description_scroll_by">Example to scroll with pixels in x,y direction</string>
|
||||
<string name="description_scroll_by">Scroll with pixels in x,y direction</string>
|
||||
|
||||
<string name="menuitem_title_concurrent_infowindow">Concurrent Open InfoWindows</string>
|
||||
|
||||
<string name="category_marker">Marker</string>
|
||||
<string name="category">category</string>
|
||||
<string name="category_annotation">Annotation</string>
|
||||
<string name="category_infowindow">InfoWindow</string>
|
||||
<string name="category_camera">Camera</string>
|
||||
<string name="category_fragment">Fragment</string>
|
||||
@@ -122,6 +119,6 @@
|
||||
<string name="button_download_region">Download region</string>
|
||||
<string name="button_list_regions">List regions</string>
|
||||
|
||||
<string name="category">category</string>
|
||||
<string name="dialog_camera_position">Animate to new position</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user