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

Testapp cleanup #10006

Merged
merged 1 commit into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@
<meta-data
android:name="@string/category"
android:value="@string/category_imagegenerator"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.maplayout.DoubleMapActivity"
Expand Down Expand Up @@ -396,18 +399,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.maplayout.NavigationDrawerActivity"
android:description="@string/description_navigation_drawer"
android:label="@string/activity_navigation_drawer"
android:theme="@style/AppTheme.ActionBar.Transparent">
<meta-data
android:name="@string/category"
android:value="@string/category_maplayout"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.maplayout.SimpleMapActivity"
android:description="@string/description_simple_map"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

import timber.log.Timber;

/**
* Test activity showcasing counting MarkerViews in a rectangle.
*/
public class MarkerViewsInRectangleActivity extends AppCompatActivity implements OnMapReadyCallback,
View.OnClickListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

import timber.log.Timber;

/**
* Test activity showcasing how to listen to camera change events.
*/
public class CameraPositionActivity extends AppCompatActivity implements OnMapReadyCallback {

private MapView mapView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

import timber.log.Timber;

/**
* Test activity showcasing using maximum and minimum zoom levels to restrict camera movement.
*/
public class MaxMinZoomActivity extends AppCompatActivity implements OnMapReadyCallback {

private MapView mapView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import com.mapbox.mapboxsdk.testapp.model.annotations.CityStateMarkerOptions;
import com.mapbox.mapboxsdk.testapp.utils.IconUtils;

/**
* Test activity showcasing using an InfoWindowAdapter to provide a custom InfoWindow content.
*/
public class InfoWindowAdapterActivity extends AppCompatActivity {

private MapView mapView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.mapboxsdk.utils.MapFragmentUtils;

/**
* Test activity showcasing using a bottomView with a MapView and stacking map fragments below.
*/
public class BottomSheetActivity extends AppCompatActivity {

private static final String TAG_MAIN_FRAGMENT = "com.mapbox.mapboxsdk.fragment.tag.main";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.visibility;

/**
* Test Activity showcasing the different debug modes and allows to cycle between the default map styles.
* Test activity showcasing the different debug modes and allows to cycle between the default map styles.
*/
public class DebugModeActivity extends AppCompatActivity implements OnMapReadyCallback {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;

Expand All @@ -23,6 +22,12 @@
import com.mapbox.mapboxsdk.maps.UiSettings;
import com.mapbox.mapboxsdk.testapp.R;

/**
* Test activity showcasing having 2 maps on top of each other.
* <p>
* The small map is using the `mapbox_enableZMediaOverlay="true"` configuration
* </p>
*/
public class DoubleMapActivity extends AppCompatActivity {

private static final String TAG_FRAGMENT = "map";
Expand All @@ -45,11 +50,11 @@ protected void onCreate(Bundle savedInstanceState) {
public void setMapboxMap(MapboxMap map) {
// we need to set mapboxmap on the parent activity,
// for auto-generated ui tests

mapboxMap = map;
mapboxMap.setStyleUrl(Style.DARK);
mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(18));
try {
mapboxMap.setMyLocationEnabled(true);
TrackingSettings settings = mapboxMap.getTrackingSettings();
settings.setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);
} catch (SecurityException securityException) {
Expand All @@ -58,6 +63,9 @@ public void setMapboxMap(MapboxMap map) {
}
}

/**
* Custom fragment containing 2 MapViews.
*/
public static class DoubleMapFragment extends Fragment {

private DoubleMapActivity activity;
Expand Down Expand Up @@ -107,6 +115,7 @@ public void onMapReady(@NonNull MapboxMap mapboxMap) {
uiSettings.setLogoEnabled(false);

try {
mapboxMap.setMyLocationEnabled(true);
TrackingSettings settings = mapboxMap.getTrackingSettings();
settings.setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);
} catch (SecurityException securityException) {
Expand All @@ -123,9 +132,6 @@ public void onMapClick(@NonNull LatLng point) {
});
}
});

SurfaceView surfaceViewMini = (SurfaceView) mapViewMini.findViewById(R.id.surfaceView);
surfaceViewMini.setZOrderMediaOverlay(true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.mapbox.mapboxsdk.testapp.R;

/**
* Test Activity showcasing restricting user gestures to a bounds around Iceland.
* Test activity showcasing restricting user gestures to a bounds around Iceland.
*/
public class LatLngBoundsForCameraActivity extends AppCompatActivity implements OnMapReadyCallback {

Expand Down
Loading