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

Commit

Permalink
[android] - move strings resources to dedicated files, fixup simple m…
Browse files Browse the repository at this point in the history
…ap activity, fixup double map activity, snapshot activity home button click fix, add activity titles, remove obsolete navigation drawer activity
  • Loading branch information
tobrun committed Sep 15, 2017
1 parent 907a96a commit 79349f8
Show file tree
Hide file tree
Showing 24 changed files with 295 additions and 588 deletions.
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 in 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 showing 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

0 comments on commit 79349f8

Please sign in to comment.