diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2016-11-02 12:41:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-02 12:41:22 +0100 |
commit | 4d0c42e36ae384102b624476e3d04c94a02190c7 (patch) | |
tree | e786a18445ee47f479e73eb47fa2d87631fa4e10 /platform | |
parent | 9ad5dd15857e7d15810877e2173839f45cc5e343 (diff) | |
download | qtlocation-mapboxgl-4d0c42e36ae384102b624476e3d04c94a02190c7.tar.gz |
Prefix library resources to avoid naming conflicts (#6878)
* [android] - add library resource prefix
* update SDK resources with prefix
* fixup tests
Diffstat (limited to 'platform')
98 files changed, 408 insertions, 411 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 4f80e59108..64f7ac2a7e 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -45,6 +45,10 @@ android { buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision()) } + android { + resourcePrefix 'mapbox_' + } + sourceSets { main.res.srcDirs += 'src/main/res-public' } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java index 56c1b643a1..2e502545d0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java @@ -120,14 +120,14 @@ public final class IconFactory { public Icon defaultMarker() { if (mDefaultMarker == null) { - mDefaultMarker = fromResource(R.drawable.default_marker); + mDefaultMarker = fromResource(R.drawable.mapbox_marker_icon_default); } return mDefaultMarker; } public Icon defaultMarkerView() { if (mDefaultMarkerView == null) { - mDefaultMarkerView = fromResource(R.drawable.default_markerview); + mDefaultMarkerView = fromResource(R.drawable.mapbox_markerview_icon_default); } return mDefaultMarkerView; } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java index 9af459e8a0..2459f6e79a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java @@ -129,8 +129,8 @@ public class InfoWindow { final float mapRight = mapView.getRight(); final float mapLeft = mapView.getLeft(); - float marginHorizontal = resources.getDimension(R.dimen.infowindow_margin); - float tipViewOffset = resources.getDimension(R.dimen.infowindow_tipview_width) / 2; + float marginHorizontal = resources.getDimension(R.dimen.mapbox_infowindow_margin); + float tipViewOffset = resources.getDimension(R.dimen.mapbox_infowindow_tipview_width) / 2; float tipViewMarginLeft = view.getMeasuredWidth() / 2 - tipViewOffset; boolean outOfBoundsLeft = false; diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java index d2afafc59d..41c7fc9e97 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java @@ -20,7 +20,7 @@ final class InfoWindowTipView extends View { super(context, attrs); mPath = new Path(); - mLineWidth = (int) context.getResources().getDimension(R.dimen.infowindow_line_width); + mLineWidth = (int) context.getResources().getDimension(R.dimen.mapbox_infowindow_line_width); mPaint = new Paint(); mPaint.setColor(Color.WHITE); mPaint.setAntiAlias(true); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowView.java index 80dc5931a7..7595073aa2 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowView.java @@ -25,7 +25,7 @@ class InfoWindowView extends RelativeLayout { } private void initialize(Context context) { - LayoutInflater.from(context).inflate(R.layout.infowindow_content, this); + LayoutInflater.from(context).inflate(R.layout.mapbox_infowindow_content, this); mTipView = (InfoWindowTipView) findViewById(R.id.infowindow_tipview); } @@ -33,6 +33,6 @@ class InfoWindowView extends RelativeLayout { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) mTipView.getLayoutParams(); layoutParams.leftMargin = marginLeft; // This is a bit of a hack but prevents an occasional gap between the InfoWindow - layoutParams.topMargin = (int) getResources().getDimension(R.dimen.infowindow_offset); + layoutParams.topMargin = (int) getResources().getDimension(R.dimen.mapbox_infowindow_offset); } } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Marker.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Marker.java index e1f692a6f4..ae0f9200ab 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Marker.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Marker.java @@ -185,7 +185,7 @@ public class Marker extends Annotation { private InfoWindow getInfoWindow(@NonNull MapView mapView) { if (infoWindow == null && mapView.getContext() != null) { - infoWindow = new InfoWindow(mapView, R.layout.infowindow_view, getMapboxMap()); + infoWindow = new InfoWindow(mapView, R.layout.mapbox_infowindow_view, getMapboxMap()); } return infoWindow; } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java index cd333268a1..e17165ae49 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java @@ -538,7 +538,7 @@ public class MarkerViewManager { ViewHolder viewHolder; if (convertView == null) { viewHolder = new ViewHolder(); - convertView = inflater.inflate(R.layout.view_image_marker, parent, false); + convertView = inflater.inflate(R.layout.mapbox_view_image_marker, parent, false); viewHolder.imageView = (ImageView) convertView.findViewById(R.id.image); convertView.setTag(viewHolder); } else { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java index 3888abc041..11296b7875 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java @@ -154,12 +154,12 @@ public final class CameraPosition implements Parcelable { public Builder(TypedArray typedArray) { super(); if (typedArray != null) { - this.bearing = typedArray.getFloat(R.styleable.MapView_direction, 0.0f); - double lat = typedArray.getFloat(R.styleable.MapView_center_latitude, 0.0f); - double lng = typedArray.getFloat(R.styleable.MapView_center_longitude, 0.0f); + this.bearing = typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_direction, 0.0f); + double lat = typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_center_latitude, 0.0f); + double lng = typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_center_longitude, 0.0f); this.target = new LatLng(lat, lng); - this.tilt = typedArray.getFloat(R.styleable.MapView_tilt, 0.0f); - this.zoom = typedArray.getFloat(R.styleable.MapView_zoom, 0.0f); + this.tilt = typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_tilt, 0.0f); + this.zoom = typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_zoom, 0.0f); } } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapFragment.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapFragment.java index ba92926d2f..84a922ed1d 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapFragment.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapFragment.java @@ -94,16 +94,16 @@ public final class MapFragment extends Fragment { Drawable foregroundBearingDrawable = options.getMyLocationForegroundBearingDrawable(); if (foregroundDrawable == null || foregroundBearingDrawable == null) { if (foregroundDrawable == null) { - foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_normal); + foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_default); } if (foregroundBearingDrawable == null) { - foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_bearing); + foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing); } options.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable); } if (options.getMyLocationBackgroundDrawable() == null) { - options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_background)); + options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape)); } return map = new MapView(inflater.getContext(), options); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index ee2e32697e..2ac95cf163 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -190,7 +190,7 @@ public class MapView extends FrameLayout { private void initialize(@NonNull Context context, @NonNull MapboxMapOptions options) { if (isInEditMode()) { // if we are in an editor mode we show an image of a map - LayoutInflater.from(context).inflate(R.layout.mapview_preview, this); + LayoutInflater.from(context).inflate(R.layout.mapbox_mapview_preview, this); return; } @@ -201,7 +201,7 @@ public class MapView extends FrameLayout { projection = mapboxMap.getProjection(); icons = new ArrayList<>(); - View view = LayoutInflater.from(context).inflate(R.layout.mapview_internal, this); + View view = LayoutInflater.from(context).inflate(R.layout.mapbox_mapview_internal, this); setWillNotDraw(false); if (options.getTextureMode()) { @@ -329,7 +329,7 @@ public class MapView extends FrameLayout { if (compassMargins != null) { uiSettings.setCompassMargins(compassMargins[0], compassMargins[1], compassMargins[2], compassMargins[3]); } else { - int tenDp = (int) getResources().getDimension(R.dimen.ten_dp); + int tenDp = (int) getResources().getDimension(R.dimen.mapbox_ten_dp); uiSettings.setCompassMargins(tenDp, tenDp, tenDp, tenDp); } uiSettings.setCompassFadeFacingNorth(options.getCompassFadeFacingNorth()); @@ -341,7 +341,7 @@ public class MapView extends FrameLayout { if (logoMargins != null) { uiSettings.setLogoMargins(logoMargins[0], logoMargins[1], logoMargins[2], logoMargins[3]); } else { - int sixteenDp = (int) getResources().getDimension(R.dimen.sixteen_dp); + int sixteenDp = (int) getResources().getDimension(R.dimen.mapbox_sixteen_dp); uiSettings.setLogoMargins(sixteenDp, sixteenDp, sixteenDp, sixteenDp); } @@ -353,8 +353,8 @@ public class MapView extends FrameLayout { uiSettings.setAttributionMargins(attributionMargins[0], attributionMargins[1], attributionMargins[2], attributionMargins[3]); } else { Resources resources = getResources(); - int sevenDp = (int) resources.getDimension(R.dimen.seven_dp); - int seventySixDp = (int) resources.getDimension(R.dimen.seventy_six_dp); + int sevenDp = (int) resources.getDimension(R.dimen.mapbox_seven_dp); + int seventySixDp = (int) resources.getDimension(R.dimen.mapbox_seventy_six_dp); uiSettings.setAttributionMargins(seventySixDp, sevenDp, sevenDp, sevenDp); } @@ -2930,10 +2930,10 @@ public class MapView extends FrameLayout { @Override public void onClick(View view) { - AlertDialog.Builder builder = new AlertDialog.Builder(mapView.getContext(), R.style.TelemAlertDialogStyle); - builder.setTitle(R.string.attributionsDialogTitle); - String[] items = mapView.getContext().getResources().getStringArray(R.array.attribution_names); - builder.setAdapter(new ArrayAdapter<>(mapView.getContext(), R.layout.attribution_list_item, items), this); + AlertDialog.Builder builder = new AlertDialog.Builder(mapView.getContext(), R.style.mapbox_AlertDialogStyle); + builder.setTitle(R.string.mapbox_attributionsDialogTitle); + String[] items = mapView.getContext().getResources().getStringArray(R.array.mapbox_attribution_names); + builder.setAdapter(new ArrayAdapter<>(mapView.getContext(), R.layout.mapbox_attribution_list_item, items), this); AlertDialog attributionDialog = builder.show(); // TODO Change listview text color to mapView.getAttributionTintColor() @@ -2944,27 +2944,27 @@ public class MapView extends FrameLayout { public void onClick(DialogInterface dialog, int which) { final Context context = ((Dialog) dialog).getContext(); if (which == ATTRIBUTION_INDEX_TELEMETRY_SETTINGS) { - AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.TelemAlertDialogStyle); - builder.setTitle(R.string.attributionTelemetryTitle); - builder.setMessage(R.string.attributionTelemetryMessage); - builder.setPositiveButton(R.string.attributionTelemetryPositive, new DialogInterface.OnClickListener() { + AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.mapbox_AlertDialogStyle); + builder.setTitle(R.string.mapbox_attributionTelemetryTitle); + builder.setMessage(R.string.mapbox_attributionTelemetryMessage); + builder.setPositiveButton(R.string.mapbox_attributionTelemetryPositive, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { MapboxEventManager.getMapboxEventManager().setTelemetryEnabled(true); dialog.cancel(); } }); - builder.setNeutralButton(R.string.attributionTelemetryNeutral, new DialogInterface.OnClickListener() { + builder.setNeutralButton(R.string.mapbox_attributionTelemetryNeutral, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - String url = context.getResources().getStringArray(R.array.attribution_links)[3]; + String url = context.getResources().getStringArray(R.array.mapbox_attribution_links)[3]; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); context.startActivity(intent); dialog.cancel(); } }); - builder.setNegativeButton(R.string.attributionTelemetryNegative, new DialogInterface.OnClickListener() { + builder.setNegativeButton(R.string.mapbox_attributionTelemetryNegative, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { MapboxEventManager.getMapboxEventManager().setTelemetryEnabled(false); @@ -2978,7 +2978,7 @@ public class MapView extends FrameLayout { telemDialog.getButton(AlertDialog.BUTTON_NEUTRAL).setTextColor(mapView.getAttributionTintColor()); return; } - String url = context.getResources().getStringArray(R.array.attribution_links)[which]; + String url = context.getResources().getStringArray(R.array.mapbox_attribution_links)[which]; if (which == ATTRIBUTION_INDEX_IMPROVE_THIS_MAP) { LatLng latLng = mapView.getMapboxMap().getCameraPosition().target; url = String.format(url, latLng.getLongitude(), latLng.getLatitude(), (int) mapView.getZoom()); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java index a54d246913..30a48be150 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java @@ -170,76 +170,76 @@ public class MapboxMapOptions implements Parcelable { public static MapboxMapOptions createFromAttributes(@NonNull Context context, @Nullable AttributeSet attrs) { MapboxMapOptions mapboxMapOptions = new MapboxMapOptions(); float screenDensity = context.getResources().getDisplayMetrics().density; - TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MapView, 0, 0); + TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.mapbox_MapView, 0, 0); try { - mapboxMapOptions.debugActive(typedArray.getBoolean(R.styleable.MapView_debug_active, false)); + mapboxMapOptions.debugActive(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_debug_active, false)); mapboxMapOptions.camera(new CameraPosition.Builder(typedArray).build()); - mapboxMapOptions.accessToken(typedArray.getString(R.styleable.MapView_access_token)); - mapboxMapOptions.styleUrl(typedArray.getString(R.styleable.MapView_style_url)); - mapboxMapOptions.apiBaseUrl(typedArray.getString(R.styleable.MapView_api_base_url)); - - mapboxMapOptions.zoomGesturesEnabled(typedArray.getBoolean(R.styleable.MapView_zoom_enabled, true)); - mapboxMapOptions.scrollGesturesEnabled(typedArray.getBoolean(R.styleable.MapView_scroll_enabled, true)); - mapboxMapOptions.rotateGesturesEnabled(typedArray.getBoolean(R.styleable.MapView_rotate_enabled, true)); - mapboxMapOptions.tiltGesturesEnabled(typedArray.getBoolean(R.styleable.MapView_tilt_enabled, true)); - mapboxMapOptions.zoomControlsEnabled(typedArray.getBoolean(R.styleable.MapView_zoom_controls_enabled, false)); - - mapboxMapOptions.maxZoom(typedArray.getFloat(R.styleable.MapView_zoom_max, MapboxConstants.MAXIMUM_ZOOM)); - mapboxMapOptions.minZoom(typedArray.getFloat(R.styleable.MapView_zoom_min, MapboxConstants.MINIMUM_ZOOM)); - - mapboxMapOptions.compassEnabled(typedArray.getBoolean(R.styleable.MapView_compass_enabled, true)); - mapboxMapOptions.compassGravity(typedArray.getInt(R.styleable.MapView_compass_gravity, Gravity.TOP | Gravity.END)); - mapboxMapOptions.compassMargins(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_compass_margin_left, DIMENSION_TEN_DP) * screenDensity) - , ((int) typedArray.getDimension(R.styleable.MapView_compass_margin_top, DIMENSION_TEN_DP * screenDensity)) - , ((int) typedArray.getDimension(R.styleable.MapView_compass_margin_right, DIMENSION_TEN_DP * screenDensity)) - , ((int) typedArray.getDimension(R.styleable.MapView_compass_margin_bottom, DIMENSION_TEN_DP * screenDensity))}); - mapboxMapOptions.compassFadesWhenFacingNorth(typedArray.getBoolean(R.styleable.MapView_compass_fade_facing_north, true)); - - mapboxMapOptions.logoEnabled(typedArray.getBoolean(R.styleable.MapView_logo_enabled, true)); - mapboxMapOptions.logoGravity(typedArray.getInt(R.styleable.MapView_logo_gravity, Gravity.BOTTOM | Gravity.START)); - mapboxMapOptions.logoMargins(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_logo_margin_left, DIMENSION_SIXTEEN_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_top, DIMENSION_SIXTEEN_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_right, DIMENSION_SIXTEEN_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_bottom, DIMENSION_SIXTEEN_DP) * screenDensity)}); - - mapboxMapOptions.attributionTintColor(typedArray.getColor(R.styleable.MapView_attribution_tint, -1)); - mapboxMapOptions.attributionEnabled(typedArray.getBoolean(R.styleable.MapView_attribution_enabled, true)); - mapboxMapOptions.attributionGravity(typedArray.getInt(R.styleable.MapView_attribution_gravity, Gravity.BOTTOM)); - mapboxMapOptions.attributionMargins(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_left, DIMENSION_SEVENTY_SIX_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_top, DIMENSION_SEVEN_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_right, DIMENSION_SEVEN_DP) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_bottom, DIMENSION_SEVEN_DP) * screenDensity)}); - - mapboxMapOptions.locationEnabled(typedArray.getBoolean(R.styleable.MapView_my_location_enabled, false)); - mapboxMapOptions.myLocationForegroundTintColor(typedArray.getColor(R.styleable.MapView_my_location_foreground_tint, Color.TRANSPARENT)); - mapboxMapOptions.myLocationBackgroundTintColor(typedArray.getColor(R.styleable.MapView_my_location_background_tint, Color.TRANSPARENT)); - - Drawable foregroundDrawable = typedArray.getDrawable(R.styleable.MapView_my_location_foreground); + mapboxMapOptions.accessToken(typedArray.getString(R.styleable.mapbox_MapView_mapbox_access_token)); + mapboxMapOptions.styleUrl(typedArray.getString(R.styleable.mapbox_MapView_mapbox_style_url)); + mapboxMapOptions.apiBaseUrl(typedArray.getString(R.styleable.mapbox_MapView_mapbox_api_base_url)); + + mapboxMapOptions.zoomGesturesEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_zoom_enabled, true)); + mapboxMapOptions.scrollGesturesEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_scroll_enabled, true)); + mapboxMapOptions.rotateGesturesEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_rotate_enabled, true)); + mapboxMapOptions.tiltGesturesEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_tilt_enabled, true)); + mapboxMapOptions.zoomControlsEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_zoom_controls_enabled, false)); + + mapboxMapOptions.maxZoom(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_zoom_max, MapboxConstants.MAXIMUM_ZOOM)); + mapboxMapOptions.minZoom(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_zoom_min, MapboxConstants.MINIMUM_ZOOM)); + + mapboxMapOptions.compassEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_compass_enabled, true)); + mapboxMapOptions.compassGravity(typedArray.getInt(R.styleable.mapbox_MapView_mapbox_compass_gravity, Gravity.TOP | Gravity.END)); + mapboxMapOptions.compassMargins(new int[]{(int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_compass_margin_left, DIMENSION_TEN_DP) * screenDensity) + , ((int) typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_compass_margin_top, DIMENSION_TEN_DP * screenDensity)) + , ((int) typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_compass_margin_right, DIMENSION_TEN_DP * screenDensity)) + , ((int) typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_compass_margin_bottom, DIMENSION_TEN_DP * screenDensity))}); + mapboxMapOptions.compassFadesWhenFacingNorth(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_compass_fade_facing_north, true)); + + mapboxMapOptions.logoEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_logo_enabled, true)); + mapboxMapOptions.logoGravity(typedArray.getInt(R.styleable.mapbox_MapView_mapbox_logo_gravity, Gravity.BOTTOM | Gravity.START)); + mapboxMapOptions.logoMargins(new int[]{(int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_logo_margin_left, DIMENSION_SIXTEEN_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_logo_margin_top, DIMENSION_SIXTEEN_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_logo_margin_right, DIMENSION_SIXTEEN_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_logo_margin_bottom, DIMENSION_SIXTEEN_DP) * screenDensity)}); + + mapboxMapOptions.attributionTintColor(typedArray.getColor(R.styleable.mapbox_MapView_mapbox_attribution_tint, -1)); + mapboxMapOptions.attributionEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_attribution_enabled, true)); + mapboxMapOptions.attributionGravity(typedArray.getInt(R.styleable.mapbox_MapView_mapbox_attribution_gravity, Gravity.BOTTOM)); + mapboxMapOptions.attributionMargins(new int[]{(int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_attribution_margin_left, DIMENSION_SEVENTY_SIX_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_attribution_margin_top, DIMENSION_SEVEN_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_attribution_margin_right, DIMENSION_SEVEN_DP) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_attribution_margin_bottom, DIMENSION_SEVEN_DP) * screenDensity)}); + + mapboxMapOptions.locationEnabled(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_my_location_enabled, false)); + mapboxMapOptions.myLocationForegroundTintColor(typedArray.getColor(R.styleable.mapbox_MapView_mapbox_my_location_foreground_tint, Color.TRANSPARENT)); + mapboxMapOptions.myLocationBackgroundTintColor(typedArray.getColor(R.styleable.mapbox_MapView_mapbox_my_location_background_tint, Color.TRANSPARENT)); + + Drawable foregroundDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_foreground); if (foregroundDrawable == null) { - foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_normal); + foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_default); } - Drawable foregroundBearingDrawable = typedArray.getDrawable(R.styleable.MapView_my_location_foreground_bearing); + Drawable foregroundBearingDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_foreground_bearing); if (foregroundBearingDrawable == null) { - foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_bearing); + foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing); } - Drawable backgroundDrawable = typedArray.getDrawable(R.styleable.MapView_my_location_background); + Drawable backgroundDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_background); if (backgroundDrawable == null) { - backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_background); + backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape); } mapboxMapOptions.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable); mapboxMapOptions.myLocationBackgroundDrawable(backgroundDrawable); - mapboxMapOptions.myLocationBackgroundPadding(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_my_location_background_left, 0) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_my_location_background_top, 0) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_my_location_background_right, 0) * screenDensity) - , (int) (typedArray.getDimension(R.styleable.MapView_my_location_background_bottom, 0) * screenDensity)}); - mapboxMapOptions.myLocationAccuracyAlpha(typedArray.getInt(R.styleable.MapView_my_location_accuracy_alpha, 100)); - mapboxMapOptions.myLocationAccuracyTint(typedArray.getColor(R.styleable.MapView_my_location_accuracy_tint, ColorUtils.getPrimaryColor(context))); - mapboxMapOptions.textureMode(typedArray.getBoolean(R.styleable.MapView_texture_mode, false)); + mapboxMapOptions.myLocationBackgroundPadding(new int[]{(int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_my_location_background_left, 0) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_my_location_background_top, 0) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_my_location_background_right, 0) * screenDensity) + , (int) (typedArray.getDimension(R.styleable.mapbox_MapView_mapbox_my_location_background_bottom, 0) * screenDensity)}); + mapboxMapOptions.myLocationAccuracyAlpha(typedArray.getInt(R.styleable.mapbox_MapView_mapbox_my_location_accuracy_alpha, 100)); + mapboxMapOptions.myLocationAccuracyTint(typedArray.getColor(R.styleable.mapbox_MapView_mapbox_my_location_accuracy_tint, ColorUtils.getPrimaryColor(context))); + mapboxMapOptions.textureMode(typedArray.getBoolean(R.styleable.mapbox_MapView_mapbox_texture_mode, false)); } finally { typedArray.recycle(); } @@ -329,9 +329,9 @@ public class MapboxMapOptions implements Parcelable { } /** - * Specifies the visibility state of a compass for a map view. + * Specifies the visibility state of a mapbox_compass_icon for a map view. * - * @param enabled True and compass is shown + * @param enabled True and mapbox_compass_icon is shown * @return This */ public MapboxMapOptions compassEnabled(boolean enabled) { @@ -340,7 +340,7 @@ public class MapboxMapOptions implements Parcelable { } /** - * Specifies the gravity state of compass for a map view. + * Specifies the gravity state of mapbox_compass_icon for a map view. * * @param gravity see {@link android.view.Gravity} * @return This @@ -351,7 +351,7 @@ public class MapboxMapOptions implements Parcelable { } /** - * Specifies the margin state of compass for a map view + * Specifies the margin state of mapbox_compass_icon for a map view * * @param margins 4 long array for LTRB margins * @return This @@ -362,12 +362,12 @@ public class MapboxMapOptions implements Parcelable { } /** - * Specifies if the compass fades to invisible when facing north. + * Specifies if the mapbox_compass_icon fades to invisible when facing north. * <p> * By default this value is true. * </p> * - * @param compassFadeWhenFacingNorth true is compass fades to invisble + * @param compassFadeWhenFacingNorth true is mapbox_compass_icon fades to invisble * @return This */ public MapboxMapOptions compassFadesWhenFacingNorth(boolean compassFadeWhenFacingNorth) { @@ -670,45 +670,45 @@ public class MapboxMapOptions implements Parcelable { } /** - * Get the current configured visibility state for compass for a map view. + * Get the current configured visibility state for mapbox_compass_icon for a map view. * - * @return Visibility state of the compass + * @return Visibility state of the mapbox_compass_icon */ public boolean getCompassEnabled() { return compassEnabled; } /** - * Get the current configured gravity state for compass for a map view. + * Get the current configured gravity state for mapbox_compass_icon for a map view. * - * @return Gravity state of the compass + * @return Gravity state of the mapbox_compass_icon */ public int getCompassGravity() { return compassGravity; } /** - * Get the current configured margins for compass for a map view. + * Get the current configured margins for mapbox_compass_icon for a map view. * - * @return Margins state of the compass + * @return Margins state of the mapbox_compass_icon */ public int[] getCompassMargins() { return compassMargins; } /** - * Get the current configured state for fading the compass when facing north. + * Get the current configured state for fading the mapbox_compass_icon when facing north. * - * @return True if compass fades to invisible when facing north + * @return True if mapbox_compass_icon fades to invisible when facing north */ public boolean getCompassFadeFacingNorth() { return fadeCompassFacingNorth; } /** - * Get the current configured visibility state for compass for a map view. + * Get the current configured visibility state for mapbox_compass_icon for a map view. * - * @return Visibility state of the compass + * @return Visibility state of the mapbox_compass_icon */ public boolean getLogoEnabled() { return logoEnabled; diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/SupportMapFragment.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/SupportMapFragment.java index 31c2ffff14..ff90f3f981 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/SupportMapFragment.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/SupportMapFragment.java @@ -103,16 +103,16 @@ public class SupportMapFragment extends Fragment { Drawable foregroundBearingDrawable = options.getMyLocationForegroundBearingDrawable(); if (foregroundDrawable == null || foregroundBearingDrawable == null) { if (foregroundDrawable == null) { - foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_normal); + foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_default); } if (foregroundBearingDrawable == null) { - foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_bearing); + foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing); } options.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable); } if (options.getMyLocationBackgroundDrawable() == null) { - options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.ic_mylocationview_background)); + options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape)); } return map = new MapView(inflater.getContext(), options); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java index 163c7a610a..352a76d834 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java @@ -51,8 +51,8 @@ public final class CompassView extends ImageView implements Runnable { } private void initialize(Context context) { - setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.compass)); - setContentDescription(getResources().getString(R.string.compassContentDescription)); + setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.mapbox_compass_icon)); + setContentDescription(getResources().getString(R.string.mapbox_compassContentDescription)); setEnabled(false); // Layout params diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml index 4fbf3d5fe1..9d2eb95ef9 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml @@ -1,57 +1,61 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!--Add references to exposed resources--> - <public name="AttributionAlertDialogStyle" type="style" /> - <public name="style_mapbox_streets" type="string" /> - <public name="style_emerald" type="string" /> - <public name="style_light" type="string" /> - <public name="style_dark" type="string" /> - <public name="style_satellite" type="string" /> - <public name="style_satellite_streets" type="string" /> + <!-- This file contains attributes and styles that are part of the public API--> + <!-- Users can find these with code completion while other ones from this module will remain--> + <!-- hidden, though the user can reference them but won't show up during code completion--> - <public name="center_longitude" type="attr" /> - <public name="center_latitude" type="attr" /> - <public name="zoom_level" type="attr" /> - <public name="direction" type="attr" /> - <public name="zoom_enabled" type="attr" /> - <public name="scroll_enabled" type="attr" /> - <public name="rotate_enabled" type="attr" /> - <public name="zoom_controls_enabled" type="attr" /> - <public name="debug_active" type="attr" /> - <public name="style_url" type="attr" /> - <public name="access_token" type="attr" /> - <public name="style_classes" type="attr" /> - <public name="my_location_enabled" type="attr" /> - <public name="compass_enabled" type="attr" /> - <public name="compass_gravity" type="attr" /> - <public name="compass_margin_left" type="attr" /> - <public name="compass_margin_top" type="attr" /> - <public name="compass_margin_right" type="attr" /> - <public name="compass_margin_bottom" type="attr" /> - <public name="compass_fade_facing_north" type="attr" /> - <public name="logo_gravity" type="attr" /> - <public name="logo_margin_left" type="attr" /> - <public name="logo_margin_top" type="attr" /> - <public name="logo_margin_right" type="attr" /> - <public name="logo_margin_bottom" type="attr" /> - <public name="logo_visibility" type="attr" /> - <public name="attribution_gravity" type="attr" /> - <public name="attribution_margin_left" type="attr" /> - <public name="attribution_margin_top" type="attr" /> - <public name="attribution_margin_right" type="attr" /> - <public name="attribution_margin_bottom" type="attr" /> - <public name="attribution_visibility" type="attr" /> + <public name="mapbox_AlertDialogStyle" type="style" /> - <public name="attribution_logo" type="drawable" /> - <public name="compass" type="drawable" /> - <public name="default_marker" type="drawable" /> - <public name="attribution_button_pressed_selector" type="drawable" /> - <public name="attribution_button_pressed_normal" type="drawable" /> - <public name="attribution_button_pressed_pressed" type="drawable" /> - <public name="my_location" type="drawable" /> - <public name="my_location_bearing" type="drawable" /> - <public name="my_location_stale" type="drawable" /> - <public name="my_location_ring" type="color" /> + <public name="mapbox_style_mapbox_streets" type="string" /> + <public name="mapbox_style_emerald" type="string" /> + <public name="mapbox_style_light" type="string" /> + <public name="mapbox_style_dark" type="string" /> + <public name="mapbox_style_satellite" type="string" /> + <public name="mapbox_style_satellite_streets" type="string" /> + + <public name="mapbox_center_longitude" type="attr" /> + <public name="mapbox_center_latitude" type="attr" /> + <public name="mapbox_zoom_level" type="attr" /> + <public name="mapbox_direction" type="attr" /> + <public name="mapbox_zoom_enabled" type="attr" /> + <public name="mapbox_scroll_enabled" type="attr" /> + <public name="mapbox_rotate_enabled" type="attr" /> + <public name="mapbox_zoom_controls_enabled" type="attr" /> + <public name="mapbox_debug_active" type="attr" /> + <public name="mapbox_style_url" type="attr" /> + <public name="mapbox_access_token" type="attr" /> + <public name="mapbox_style_classes" type="attr" /> + <public name="mapbox_my_location_enabled" type="attr" /> + <public name="mapbox_compass_enabled" type="attr" /> + <public name="mapbox_compass_gravity" type="attr" /> + <public name="mapbox_compass_margin_left" type="attr" /> + <public name="mapbox_compass_margin_top" type="attr" /> + <public name="mapbox_compass_margin_right" type="attr" /> + <public name="mapbox_compass_margin_bottom" type="attr" /> + <public name="mapbox_compass_fade_facing_north" type="attr" /> + <public name="mapbox_logo_gravity" type="attr" /> + <public name="mapbox_logo_margin_left" type="attr" /> + <public name="mapbox_logo_margin_top" type="attr" /> + <public name="mapbox_logo_margin_right" type="attr" /> + <public name="mapbox_logo_margin_bottom" type="attr" /> + <public name="mapbox_logo_visibility" type="attr" /> + <public name="mapbox_attribution_gravity" type="attr" /> + <public name="mapbox_attribution_margin_left" type="attr" /> + <public name="mapbox_attribution_margin_top" type="attr" /> + <public name="mapbox_attribution_margin_right" type="attr" /> + <public name="mapbox_attribution_margin_bottom" type="attr" /> + <public name="mapbox_attribution_visibility" type="attr" /> + + <public name="mapbox_attribution_logo" type="drawable" /> + <public name="mapbox_compass" type="drawable" /> + <public name="mapbox_default_marker" type="drawable" /> + <public name="mapbox_attribution_button_pressed_selector" type="drawable" /> + <public name="mapbox_attribution_button_pressed_normal" type="drawable" /> + <public name="mapbox_attribution_button_pressed_pressed" type="drawable" /> + <public name="mapbox_my_location" type="drawable" /> + <public name="mapbox_my_location_bearing" type="drawable" /> + <public name="mapbox_my_location_stale" type="drawable" /> + <public name="mapbox_my_location_ring" type="color" /> <public name="mapbox_blue" type="color" /> </resources> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/color/material_bg_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml index 64d7f46c2d..64d7f46c2d 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/color/material_bg_selector.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/compass.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_compass_icon.png Binary files differindex 6bb20027f4..6bb20027f4 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/compass.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_compass_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/attribution_logo.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_logo_icon.png Binary files differindex c0f4ed2c4c..c0f4ed2c4c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/attribution_logo.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_logo_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/default_marker.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_marker_icon_default.png Binary files differindex 8b0af4c6ab..8b0af4c6ab 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/default_marker.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_marker_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/default_markerview.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_markerview_icon_default.png Binary files differindex 651482f3ee..651482f3ee 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/default_markerview.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_markerview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_mylocationview_bearing.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_mylocationview_icon_bearing.png Binary files differindex c93fa4781a..c93fa4781a 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_mylocationview_bearing.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_mylocationview_icon_bearing.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_mylocationview_normal.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_mylocationview_icon_default.png Binary files differindex 120b7dd612..120b7dd612 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_mylocationview_normal.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/mapbox_mylocationview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/compass.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_compass_icon.png Binary files differindex cf15ed1876..cf15ed1876 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/compass.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_compass_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/attribution_logo.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_logo_icon.png Binary files differindex 5a9da3fe39..5a9da3fe39 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/attribution_logo.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_logo_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/default_marker.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_marker_icon_default.png Binary files differindex b112096c18..b112096c18 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/default_marker.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_marker_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/default_markerview.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_markerview_icon_default.png Binary files differindex 63cb7b5f4b..63cb7b5f4b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/default_markerview.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_markerview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_mylocationview_bearing.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_mylocationview_icon_bearing.png Binary files differindex 0d7d89a8b4..0d7d89a8b4 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_mylocationview_bearing.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_mylocationview_icon_bearing.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_mylocationview_normal.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_mylocationview_icon_default.png Binary files differindex 831ef1acf4..831ef1acf4 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_mylocationview_normal.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/mapbox_mylocationview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-v21/bg_default_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-v21/mapbox_default_bg_selector.xml index ef82c18f5d..ef82c18f5d 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-v21/bg_default_selector.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-v21/mapbox_default_bg_selector.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/compass.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_compass_icon.png Binary files differindex 6257209368..6257209368 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/compass.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_compass_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/attribution_logo.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_logo_icon.png Binary files differindex 194aa64da2..194aa64da2 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/attribution_logo.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_logo_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/default_marker.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_marker_icon_default.png Binary files differindex d05c82bfe2..d05c82bfe2 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/default_marker.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_marker_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/default_markerview.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_markerview_icon_default.png Binary files differindex 175f88ff88..175f88ff88 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/default_markerview.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_markerview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_mylocationview_bearing.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_mylocationview_icon_bearing.png Binary files differindex 1056d617e9..1056d617e9 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_mylocationview_bearing.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_mylocationview_icon_bearing.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_mylocationview_normal.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_mylocationview_icon_default.png Binary files differindex 37b1f7adbf..37b1f7adbf 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_mylocationview_normal.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/mapbox_mylocationview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/compass.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_compass_icon.png Binary files differindex c59b4c7528..c59b4c7528 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/compass.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_compass_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/attribution_logo.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_logo_icon.png Binary files differindex d1260a16f3..d1260a16f3 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/attribution_logo.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_logo_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapview_preview.jpg b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg Binary files differindex 3a21fc08bc..3a21fc08bc 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapview_preview.jpg +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/default_marker.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_marker_icon_default.png Binary files differindex 703b172c15..703b172c15 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/default_marker.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_marker_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/default_markerview.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_markerview_icon_default.png Binary files differindex be782e1d4b..be782e1d4b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/default_markerview.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_markerview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_mylocationview_bearing.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mylocationview_icon_bearing.png Binary files differindex 1ff2590606..1ff2590606 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_mylocationview_bearing.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mylocationview_icon_bearing.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_mylocationview_normal.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mylocationview_icon_default.png Binary files differindex 520b85eff7..520b85eff7 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_mylocationview_normal.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mylocationview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/compass.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_compass_icon.png Binary files differindex da04f5b94c..da04f5b94c 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/compass.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_compass_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/bg_infowindow_content.9.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png Binary files differindex 584b320299..584b320299 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/bg_infowindow_content.9.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/attribution_logo.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_logo_icon.png Binary files differindex 5f9647610a..5f9647610a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/attribution_logo.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_logo_icon.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/default_marker.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_marker_icon_default.png Binary files differindex 8331ffef71..8331ffef71 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/default_marker.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_marker_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/default_markerview.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_markerview_icon_default.png Binary files differindex fe1c486518..fe1c486518 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/default_markerview.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_markerview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_mylocationview_bearing.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_mylocationview_icon_bearing.png Binary files differindex 671c33a08e..671c33a08e 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_mylocationview_bearing.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_mylocationview_icon_bearing.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_mylocationview_normal.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_mylocationview_icon_default.png Binary files differindex f9f4265d2a..f9f4265d2a 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_mylocationview_normal.png +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_mylocationview_icon_default.png diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/bg_default_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/bg_default_selector.xml deleted file mode 100644 index 48e53e7ee8..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/bg_default_selector.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@color/gray_light" android:state_pressed="true" /> - <item android:drawable="@color/gray_light" android:state_focused="true" /> - <item android:drawable="@android:color/transparent" /> -</selector>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp_selector.xml deleted file mode 100644 index 7f6245b30a..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp_selector.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@drawable/ic_info_outline_24dp_selected" android:state_pressed="true" /> - <item android:drawable="@drawable/ic_info_outline_24dp" /> -</selector>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_mylocationview_background.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_mylocationview_background.xml deleted file mode 100644 index e1df60788e..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_mylocationview_background.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="oval"> - - <solid android:color="@color/white" /> - - <size - android:width="@dimen/my_locationview_outer_circle" - android:height="@dimen/my_locationview_outer_circle" /> -</shape>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_default_bg_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_default_bg_selector.xml new file mode 100644 index 0000000000..45073bb1f3 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_default_bg_selector.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@color/mapbox_gray_light" android:state_pressed="true" /> + <item android:drawable="@color/mapbox_gray_light" android:state_focused="true" /> + <item android:drawable="@android:color/transparent" /> +</selector>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_bg_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_bg_selector.xml new file mode 100644 index 0000000000..3ead19b781 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_bg_selector.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/mapbox_info_icon_selected" android:state_pressed="true" /> + <item android:drawable="@drawable/mapbox_info_icon_default" /> +</selector>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_icon_default.xml index fa82bb8d9b..fa82bb8d9b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_icon_default.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp_selected.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_icon_selected.xml index 074928d05a..074928d05a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/ic_info_outline_24dp_selected.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_info_icon_selected.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_mylocationview_bg_shape.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_mylocationview_bg_shape.xml new file mode 100644 index 0000000000..df0687bbd3 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable/mapbox_mylocationview_bg_shape.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval"> + + <solid android:color="@android:color/white" /> + + <size + android:width="@dimen/mapbox_my_locationview_outer_circle" + android:height="@dimen/mapbox_my_locationview_outer_circle" /> +</shape>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/attribution_list_item.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml index 763bb118e0..763bb118e0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/attribution_list_item.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/infowindow_content.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml index 3e36cbf91a..e1673902ef 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/infowindow_content.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml @@ -5,7 +5,7 @@ android:id="@+id/infowindow_content" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/bg_infowindow_content" + android:background="@drawable/mapbox_infowindow_icon_bg" android:orientation="vertical" android:paddingBottom="16dp" android:paddingLeft="20dp" @@ -18,8 +18,8 @@ android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:maxEms="17" - android:text="@string/infoWindowTitle" - android:textColor="@color/black" + android:text="@string/mapbox_infoWindowTitle" + android:textColor="@android:color/black" android:textSize="18sp" android:textStyle="bold" /> @@ -31,8 +31,8 @@ android:layout_marginTop="2dp" android:lineSpacingExtra="1dp" android:maxEms="17" - android:text="@string/infoWindowDescription" - android:textColor="@color/gray" + android:text="@string/mapbox_infoWindowDescription" + android:textColor="@color/mapbox_gray" android:textSize="14sp" /> <TextView @@ -40,15 +40,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxEms="17" - android:text="@string/infoWindowAddress" - android:textColor="@color/black" + android:text="@string/mapbox_infoWindowAddress" + android:textColor="@android:color/black" android:textSize="12sp" android:visibility="gone" /> </LinearLayout> <com.mapbox.mapboxsdk.annotations.InfoWindowTipView android:id="@+id/infowindow_tipview" - android:layout_width="@dimen/infowindow_tipview_width" + android:layout_width="@dimen/mapbox_infowindow_tipview_width" android:layout_height="14dp" android:layout_below="@+id/infowindow_content" /> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/infowindow_view.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_view.xml index ff47642426..ff47642426 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/infowindow_view.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_view.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapview_internal.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml index 4f032c1008..c6dcd35a2f 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapview_internal.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml @@ -27,18 +27,18 @@ android:id="@+id/logoView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:contentDescription="@string/mapboxIconContentDescription" - android:src="@drawable/attribution_logo" /> + android:contentDescription="@string/mapbox_iconContentDescription" + android:src="@drawable/mapbox_logo_icon" /> <ImageView android:id="@+id/attributionView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" - android:background="@drawable/bg_default_selector" + android:background="@drawable/mapbox_default_bg_selector" android:clickable="true" - android:contentDescription="@string/attributionsIconContentDescription" + android:contentDescription="@string/mapbox_attributionsIconContentDescription" android:padding="7dp" - android:src="@drawable/ic_info_outline_24dp_selector" /> + android:src="@drawable/mapbox_info_bg_selector" /> </merge>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapview_preview.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_preview.xml index d8f2193fd5..5517c0cfe6 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapview_preview.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_preview.xml @@ -8,34 +8,34 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" - android:src="@drawable/mapview_preview" /> + android:src="@drawable/mapbox_mapview_preview" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" - android:layout_marginBottom="@dimen/eight_dp" - android:layout_marginLeft="@dimen/eight_dp" - android:contentDescription="@string/mapboxIconContentDescription" - android:src="@drawable/attribution_logo" /> + android:layout_marginBottom="@dimen/mapbox_eight_dp" + android:layout_marginLeft="@dimen/mapbox_eight_dp" + android:contentDescription="@string/mapbox_iconContentDescription" + android:src="@drawable/mapbox_logo_icon" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_marginBottom="@dimen/seven_dp" - android:layout_marginLeft="@dimen/seventy_six_dp" - android:background="@drawable/bg_default_selector" + android:layout_marginBottom="@dimen/mapbox_seven_dp" + android:layout_marginLeft="@dimen/mapbox_seventy_six_dp" + android:background="@drawable/mapbox_default_bg_selector" android:clickable="true" - android:contentDescription="@string/attributionsIconContentDescription" - android:src="@drawable/ic_info_outline_24dp_selector" /> + android:contentDescription="@string/mapbox_attributionsIconContentDescription" + android:src="@drawable/mapbox_info_bg_selector" /> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_alignParentRight="true" android:layout_margin="10dp" - android:src="@drawable/compass" /> + android:src="@drawable/mapbox_compass_icon" /> </RelativeLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/view_image_marker.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml index 7e4a079063..7e4a079063 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/view_image_marker.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/arrays.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/arrays.xml index bb466880aa..5a5fd6cb4c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/arrays.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/arrays.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <array name="attribution_names"> + <array name="mapbox_attribution_names"> <item>© Mapbox</item> <item>© OpenStreetMap</item> <item>Improve this map</item> <item>Telemetry Settings</item> </array> <!-- If editing this array update MapView.ATTRIBUTION_INDEX_IMPROVE_THIS_MAP --> - <array name="attribution_links" formatted="false" translatable="false"> + <array name="mapbox_attribution_links" formatted="false" translatable="false"> <item>https://www.mapbox.com/about/maps/</item> <item>http://www.openstreetmap.org/about/</item> <item>https://www.mapbox.com/map-feedback/#/%1$f/%2$f/%3$d</item> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml index 458056c14e..5c067c2a86 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml @@ -1,50 +1,50 @@ <resources> <!-- these are public --> - <declare-styleable name="MapView"> + <declare-styleable name="mapbox_MapView"> <!--Configuration--> - <attr name="access_token" format="string" /> - <attr name="style_url" format="string" /> - <attr name="api_base_url" format="string" /> + <attr name="mapbox_access_token" format="string" /> + <attr name="mapbox_style_url" format="string" /> + <attr name="mapbox_api_base_url" format="string" /> <!--Camera--> - <attr name="center_longitude" format="float" /> - <attr name="center_latitude" format="float" /> - <attr name="zoom" format="float" /> - <attr name="direction" format="float" /> - <attr name="tilt" format="float" /> + <attr name="mapbox_center_longitude" format="float" /> + <attr name="mapbox_center_latitude" format="float" /> + <attr name="mapbox_zoom" format="float" /> + <attr name="mapbox_direction" format="float" /> + <attr name="mapbox_tilt" format="float" /> <!--Zoom--> - <attr name="zoom_max" format="float" /> - <attr name="zoom_min" format="float" /> + <attr name="mapbox_zoom_max" format="float" /> + <attr name="mapbox_zoom_min" format="float" /> <!--Gestures--> - <attr name="zoom_enabled" format="boolean" /> - <attr name="scroll_enabled" format="boolean" /> - <attr name="rotate_enabled" format="boolean" /> - <attr name="tilt_enabled" format="boolean" /> - <attr name="debug_active" format="boolean" /> + <attr name="mapbox_zoom_enabled" format="boolean" /> + <attr name="mapbox_scroll_enabled" format="boolean" /> + <attr name="mapbox_rotate_enabled" format="boolean" /> + <attr name="mapbox_tilt_enabled" format="boolean" /> + <attr name="mapbox_debug_active" format="boolean" /> <!--UI-Controls--> - <attr name="zoom_controls_enabled" format="boolean" /> + <attr name="mapbox_zoom_controls_enabled" format="boolean" /> <!--MyLocation--> - <attr name="my_location_enabled" format="boolean" /> - <attr name="my_location_foreground" format="reference" /> - <attr name="my_location_foreground_bearing" format="reference" /> - <attr name="my_location_foreground_tint" format="color" /> - <attr name="my_location_background" format="reference" /> - <attr name="my_location_background_tint" format="color" /> - <attr name="my_location_background_left" format="dimension" /> - <attr name="my_location_background_top" format="dimension" /> - <attr name="my_location_background_right" format="dimension" /> - <attr name="my_location_background_bottom" format="dimension" /> - <attr name="my_location_accuracy_tint" format="color" /> - <attr name="my_location_accuracy_alpha" format="integer" /> + <attr name="mapbox_my_location_enabled" format="boolean" /> + <attr name="mapbox_my_location_foreground" format="reference" /> + <attr name="mapbox_my_location_foreground_bearing" format="reference" /> + <attr name="mapbox_my_location_foreground_tint" format="color" /> + <attr name="mapbox_my_location_background" format="reference" /> + <attr name="mapbox_my_location_background_tint" format="color" /> + <attr name="mapbox_my_location_background_left" format="dimension" /> + <attr name="mapbox_my_location_background_top" format="dimension" /> + <attr name="mapbox_my_location_background_right" format="dimension" /> + <attr name="mapbox_my_location_background_bottom" format="dimension" /> + <attr name="mapbox_my_location_accuracy_tint" format="color" /> + <attr name="mapbox_my_location_accuracy_alpha" format="integer" /> <!--Compass--> - <attr name="compass_enabled" format="boolean" /> - <attr name="compass_gravity"> + <attr name="mapbox_compass_enabled" format="boolean" /> + <attr name="mapbox_compass_gravity"> <flag name="top" value="0x30" /> <flag name="bottom" value="0x50" /> <flag name="left" value="0x03" /> @@ -60,14 +60,14 @@ <flag name="start" value="0x00800003" /> <flag name="end" value="0x00800005" /> </attr> - <attr name="compass_margin_left" format="dimension" /> - <attr name="compass_margin_top" format="dimension" /> - <attr name="compass_margin_right" format="dimension" /> - <attr name="compass_margin_bottom" format="dimension" /> - <attr name="compass_fade_facing_north" format="boolean" /> + <attr name="mapbox_compass_margin_left" format="dimension" /> + <attr name="mapbox_compass_margin_top" format="dimension" /> + <attr name="mapbox_compass_margin_right" format="dimension" /> + <attr name="mapbox_compass_margin_bottom" format="dimension" /> + <attr name="mapbox_compass_fade_facing_north" format="boolean" /> <!--Logo--> - <attr name="logo_gravity"> + <attr name="mapbox_logo_gravity"> <flag name="top" value="0x30" /> <flag name="bottom" value="0x50" /> <flag name="left" value="0x03" /> @@ -83,14 +83,14 @@ <flag name="start" value="0x00800003" /> <flag name="end" value="0x00800005" /> </attr> - <attr name="logo_margin_left" format="dimension" /> - <attr name="logo_margin_top" format="dimension" /> - <attr name="logo_margin_right" format="dimension" /> - <attr name="logo_margin_bottom" format="dimension" /> - <attr name="logo_enabled" format="boolean" /> + <attr name="mapbox_logo_margin_left" format="dimension" /> + <attr name="mapbox_logo_margin_top" format="dimension" /> + <attr name="mapbox_logo_margin_right" format="dimension" /> + <attr name="mapbox_logo_margin_bottom" format="dimension" /> + <attr name="mapbox_logo_enabled" format="boolean" /> <!--Attribution--> - <attr name="attribution_gravity"> + <attr name="mapbox_attribution_gravity"> <flag name="top" value="0x30" /> <flag name="bottom" value="0x50" /> <flag name="left" value="0x03" /> @@ -106,14 +106,14 @@ <flag name="start" value="0x00800003" /> <flag name="end" value="0x00800005" /> </attr> - <attr name="attribution_margin_left" format="dimension" /> - <attr name="attribution_margin_top" format="dimension" /> - <attr name="attribution_margin_right" format="dimension" /> - <attr name="attribution_margin_bottom" format="dimension" /> - <attr name="attribution_enabled" format="boolean" /> - <attr name="attribution_tint" format="color" /> + <attr name="mapbox_attribution_margin_left" format="dimension" /> + <attr name="mapbox_attribution_margin_top" format="dimension" /> + <attr name="mapbox_attribution_margin_right" format="dimension" /> + <attr name="mapbox_attribution_margin_bottom" format="dimension" /> + <attr name="mapbox_attribution_enabled" format="boolean" /> + <attr name="mapbox_attribution_tint" format="color" /> <!-- Deprecated to use TextureView--> - <attr name="texture_mode" format="boolean" /> + <attr name="mapbox_texture_mode" format="boolean" /> </declare-styleable> </resources> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml index 63f739c30c..63ef42c2c3 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml @@ -1,9 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="white">#F9F9F9</color> - <color name="black">#000000</color> - <color name="gray">#7D7F80</color> - <color name="gray_light">#EEEEEE</color> + <color name="mapbox_gray">#7D7F80</color> + <color name="mapbox_gray_light">#EEEEEE</color> <color name="mapbox_blue">#1E8CAB</color> - <color name="my_location_ring">@color/mapbox_blue</color> + <color name="mapbox_my_location_ring">@color/mapbox_blue</color> </resources> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml index fd0f4b98e7..31b9dd2bcd 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <dimen name="infowindow_tipview_width">20dp</dimen> - <dimen name="infowindow_margin">8dp</dimen> - <dimen name="infowindow_offset">-2dp</dimen> - <dimen name="infowindow_line_width">1.5dp</dimen> - <dimen name="seven_dp">7dp</dimen> - <dimen name="eight_dp">8dp</dimen> - <dimen name="ten_dp">10dp</dimen> - <dimen name="sixteen_dp">16dp</dimen> - <dimen name="seventy_six_dp">76dp</dimen> - <dimen name="my_locationview_outer_circle">18dp</dimen> + <dimen name="mapbox_infowindow_tipview_width">20dp</dimen> + <dimen name="mapbox_infowindow_margin">8dp</dimen> + <dimen name="mapbox_infowindow_offset">-2dp</dimen> + <dimen name="mapbox_infowindow_line_width">1.5dp</dimen> + <dimen name="mapbox_seven_dp">7dp</dimen> + <dimen name="mapbox_eight_dp">8dp</dimen> + <dimen name="mapbox_ten_dp">10dp</dimen> + <dimen name="mapbox_sixteen_dp">16dp</dimen> + <dimen name="mapbox_seventy_six_dp">76dp</dimen> + <dimen name="mapbox_my_locationview_outer_circle">18dp</dimen> </resources> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/integers.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/integers.xml deleted file mode 100644 index 3727365659..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/integers.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <integer name="style_version">9</integer> -</resources>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml index c8bb9d65ba..f15979efc1 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml @@ -1,27 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string name="compassContentDescription">Map compass. Click to reset the map rotation to North.</string> - <string name="attributionsIconContentDescription">Attribution icon. Click to show attribution dialog.</string> - <string name="attributionsDialogTitle">Mapbox Android SDK</string> - <string name="attributionTelemetryTitle">Make Mapbox Maps Better</string> - <string name="attributionTelemetryMessage">You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.</string> - <string name="attributionTelemetryPositive">Agree</string> - <string name="attributionTelemetryNegative">Disagree</string> - <string name="attributionTelemetryNeutral">More info</string> - <string name="mapboxIconContentDescription">The Mapbox logo.</string> - <string name="infoWindowTitle">Title</string> - <string name="infoWindowDescription">Description</string> - <string name="infoWindowAddress">Address</string> + <string name="mapbox_compassContentDescription">Map compass. Click to reset the map rotation to North.</string> + <string name="mapbox_attributionsIconContentDescription">Attribution icon. Click to show attribution dialog.</string> + <string name="mapbox_attributionsDialogTitle">Mapbox Android SDK</string> + <string name="mapbox_attributionTelemetryTitle">Make Mapbox Maps Better</string> + <string name="mapbox_attributionTelemetryMessage">You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.</string> + <string name="mapbox_attributionTelemetryPositive">Agree</string> + <string name="mapbox_attributionTelemetryNegative">Disagree</string> + <string name="mapbox_attributionTelemetryNeutral">More info</string> + <string name="mapbox_iconContentDescription">The Mapbox logo.</string> + <string name="mapbox_infoWindowTitle">Title</string> + <string name="mapbox_infoWindowDescription">Description</string> + <string name="mapbox_infoWindowAddress">Address</string> <!-- these are public --> <!-- Using one of these constants means your map style will always use the latest version and may change as we improve the style. --> - <string name="style_mapbox_streets">mapbox://styles/mapbox/streets-v9</string> - <string name="style_outdoors">mapbox://styles/mapbox/outdoors-v9</string> + <string name="mapbox_style_mapbox_streets">mapbox://styles/mapbox/streets-v9</string> + <string name="mapbox_style_outdoors">mapbox://styles/mapbox/outdoors-v9</string> <!-- Note: Emerald style has been deprecated and will be removed in a future release--> - <string name="style_emerald">mapbox://styles/mapbox/emerald-v8</string> - <string name="style_light">mapbox://styles/mapbox/light-v9</string> - <string name="style_dark">mapbox://styles/mapbox/dark-v9</string> - <string name="style_satellite">mapbox://styles/mapbox/satellite-v9</string> - <string name="style_satellite_streets">mapbox://styles/mapbox/satellite-streets-v9</string> + <string name="mapbox_style_emerald">mapbox://styles/mapbox/emerald-v8</string> + <string name="mapbox_style_light">mapbox://styles/mapbox/light-v9</string> + <string name="mapbox_style_dark">mapbox://styles/mapbox/dark-v9</string> + <string name="mapbox_style_satellite">mapbox://styles/mapbox/satellite-v9</string> + <string name="mapbox_style_satellite_streets">mapbox://styles/mapbox/satellite-streets-v9</string> </resources> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml index 708cfc72e9..82d9d1e076 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml @@ -1,11 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- these are public --> - <style name="AttributionAlertDialogStyle" parent="Theme.AppCompat.Dialog.Alert"> - <item name="android:textColorPrimary">@android:color/white</item> - </style> - - <style name="TelemAlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert"/> + <style name="mapbox_AlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert"/> </resources>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java index eb289d7d4b..68f3f80277 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java @@ -63,7 +63,7 @@ public class CameraPositionActivity extends AppCompatActivity implements OnMapRe 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); + context, com.mapbox.mapboxsdk.R.style.mapbox_AlertDialogStyle); builder.setTitle(R.string.dialog_camera_position); builder.setView(onInflateDialogContent(dialogContent)); builder.setPositiveButton("Animate", new DialogInterface.OnClickListener() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java index 77cba30372..0c77b60d9a 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java @@ -78,7 +78,7 @@ public class MyLocationTintActivity extends AppCompatActivity implements Locatio @Override public void onClick(View view) { myLocationViewSettings.setAccuracyTintColor(ContextCompat.getColor( - MyLocationTintActivity.this, R.color.my_location_ring)); + MyLocationTintActivity.this, R.color.mapbox_my_location_ring)); myLocationViewSettings.setForegroundTintColor(ContextCompat.getColor( MyLocationTintActivity.this, R.color.mapbox_blue)); } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml index 086b18fea1..9cb9f4dbd6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml @@ -16,10 +16,10 @@ android:id="@id/mapView" android:layout_below="@id/toolbar" android:layout_width="match_parent" - app:center_latitude="52.519003" - app:center_longitude="13.400972" - app:style_url="@string/style_mapbox_streets" - app:zoom="16" + app:mapbox_center_latitude="52.519003" + app:mapbox_center_longitude="13.400972" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="16" android:layout_height="match_parent"/> <android.support.design.widget.FloatingActionButton diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_marker.xml index eabfc30b25..8ac30bcf2b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_marker.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_marker.xml @@ -17,9 +17,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" - app:center_latitude="51.502615" - app:center_longitude="4.972326" - app:style_url="@string/style_light" - app:zoom="6" /> + app:mapbox_center_latitude="51.502615" + app:mapbox_center_longitude="4.972326" + app:mapbox_style_url="@string/mapbox_style_light" + app:mapbox_zoom="6" /> </RelativeLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_animation_types.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_animation_types.xml index 5a5fb5f604..ba1f4c17df 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_animation_types.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_animation_types.xml @@ -17,9 +17,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/toolbar" - app:center_latitude="51.50325" - app:center_longitude="-0.11968" - app:zoom="15" /> + app:mapbox_center_latitude="51.50325" + app:mapbox_center_longitude="-0.11968" + app:mapbox_zoom="15" /> <LinearLayout android:layout_width="match_parent" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml index 2e08f79e95..0cded42204 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml @@ -21,7 +21,7 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" /> + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml index c61055ee4e..5af41a0ab7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml @@ -16,9 +16,9 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:my_location_foreground_tint="@color/primary" - app:my_location_accuracy_tint="@color/primary" - app:style_url="@string/style_mapbox_streets" - app:zoom="15" /> + app:mapbox_my_location_foreground_tint="@color/primary" + app:mapbox_my_location_accuracy_tint="@color/primary" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="15" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml index 086b18fea1..9cb9f4dbd6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml @@ -16,10 +16,10 @@ android:id="@id/mapView" android:layout_below="@id/toolbar" android:layout_width="match_parent" - app:center_latitude="52.519003" - app:center_longitude="13.400972" - app:style_url="@string/style_mapbox_streets" - app:zoom="16" + app:mapbox_center_latitude="52.519003" + app:mapbox_center_longitude="13.400972" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="16" android:layout_height="match_parent"/> <android.support.design.widget.FloatingActionButton diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml index 5de3651272..ba3c5fbd30 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml @@ -16,6 +16,6 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" /> + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml index d6507559ec..ec622e48cc 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml @@ -26,12 +26,12 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="51.506675" - app:center_longitude="-0.128699" - app:compass_fade_facing_north="false" - app:direction="90" - app:tilt="40" - app:zoom="10" /> + app:mapbox_center_latitude="51.506675" + app:mapbox_center_longitude="-0.128699" + app:mapbox_compass_fade_facing_north="false" + app:mapbox_direction="90" + app:mapbox_tilt="40" + app:mapbox_zoom="10" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml index 002ece58bf..256f94fa99 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml @@ -17,9 +17,9 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="5" - app:center_latitude="38.90962" - app:center_longitude="-77.04341" - app:zoom="15" /> + app:mapbox_center_latitude="38.90962" + app:mapbox_center_longitude="-77.04341" + app:mapbox_zoom="15" /> <TextView android:id="@+id/message" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml index e69983941a..97f4e01e54 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml @@ -16,9 +16,9 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="38.897705003219784" - app:center_longitude="-77.03655168667463" - app:style_url="@string/style_mapbox_streets" - app:zoom="15" /> + app:mapbox_center_latitude="38.897705003219784" + app:mapbox_center_longitude="-77.03655168667463" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="15" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml index dde63c8420..a41063f285 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml @@ -16,9 +16,9 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="47.798202" - app:center_longitude="7.573781" - app:style_url="@string/style_mapbox_streets" - app:zoom="4" /> + app:mapbox_center_latitude="47.798202" + app:mapbox_center_longitude="7.573781" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="4" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml index dde63c8420..a41063f285 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml @@ -16,9 +16,9 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="47.798202" - app:center_longitude="7.573781" - app:style_url="@string/style_mapbox_streets" - app:zoom="4" /> + app:mapbox_center_latitude="47.798202" + app:mapbox_center_longitude="7.573781" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="4" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml index c1f09a36d0..7dfdd5da06 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml @@ -14,10 +14,10 @@ <com.mapbox.mapboxsdk.maps.MapView android:id="@id/mapView" - app:center_latitude="50.871062" - app:center_longitude="1.583210" - app:direction="220" - app:zoom="10" + app:mapbox_center_latitude="50.871062" + app:mapbox_center_longitude="1.583210" + app:mapbox_direction="220" + app:mapbox_zoom="10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" /> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml index 90cb1a90b3..4b2b7385b1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml @@ -22,11 +22,11 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="38.87031" + app:mapbox_center_latitude="38.87031" android:layout_below="@id/toolbar" - app:center_longitude="-77.00897" - app:style_url="@string/style_mapbox_streets" - app:zoom="10" /> + app:mapbox_center_longitude="-77.00897" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="10" /> <TextView android:id="@+id/countView" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml index 5d285958f1..6a292a4e83 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view.xml @@ -16,10 +16,10 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/toolbar" - app:center_latitude="38.907192" - app:center_longitude="-77.036871" - app:style_url="@string/style_mapbox_streets" - app:zoom="12" /> + app:mapbox_center_latitude="38.907192" + app:mapbox_center_longitude="-77.036871" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="12" /> <TextView android:id="@+id/countView" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view_scale.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view_scale.xml index c59f41539c..11cb2ca984 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view_scale.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_view_scale.xml @@ -52,9 +52,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/toolbar" - app:center_latitude="38.907192" - app:center_longitude="-77.036871" - app:style_url="@string/style_mapbox_streets" - app:zoom="12" /> + app:mapbox_center_latitude="38.907192" + app:mapbox_center_longitude="-77.036871" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="12" /> </RelativeLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_maxmin_zoom.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_maxmin_zoom.xml index 951344e35a..1e31e9cc4f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_maxmin_zoom.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_maxmin_zoom.xml @@ -17,9 +17,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" - app:center_latitude="-1.063510" - app:center_longitude=" 32.895425" - app:style_url="@string/style_satellite_streets" - app:zoom="4" /> + app:mapbox_center_latitude="-1.063510" + app:mapbox_center_longitude=" 32.895425" + app:mapbox_style_url="@string/mapbox_style_satellite_streets" + app:mapbox_zoom="4" /> </RelativeLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml index 19c30dbb8d..586af46e8a 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml @@ -42,9 +42,9 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:my_location_foreground_tint="@color/primary" - app:my_location_accuracy_tint="@color/primary" - app:style_url="@string/style_mapbox_streets" - app:zoom="15" /> + app:mapbox_my_location_foreground_tint="@color/primary" + app:mapbox_my_location_accuracy_tint="@color/primary" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="15" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml index 9e2f875192..61caaef04e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml @@ -17,11 +17,11 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/toolbar" - app:attribution_tint="@android:color/holo_green_dark" - app:center_latitude="47.798202" - app:center_longitude="7.573781" - app:style_url="@string/style_mapbox_streets" - app:zoom="4" /> + app:mapbox_attribution_tint="@android:color/holo_green_dark" + app:mapbox_center_latitude="47.798202" + app:mapbox_center_longitude="7.573781" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="4" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml index 9ff79686d2..36c8a8c476 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_press_for_marker.xml @@ -17,12 +17,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" - app:attribution_gravity="top|end" - app:center_latitude="45.1855569" - app:center_longitude="5.7215506" - app:logo_gravity="top|end" - app:logo_margin_right="10dp" - app:style_url="@string/style_mapbox_streets" - app:zoom="11" /> + app:mapbox_attribution_gravity="top|end" + app:mapbox_center_latitude="45.1855569" + app:mapbox_center_longitude="5.7215506" + app:mapbox_logo_gravity="top|end" + app:mapbox_logo_margin_right="10dp" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="11" /> </RelativeLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml index c5bb8d71b3..e1931585bc 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml @@ -80,10 +80,10 @@ android:id="@id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:center_latitude="37.176546" - app:center_longitude="-3.599007" - app:style_url="@string/style_emerald" - app:zoom="15" /> + app:mapbox_center_latitude="37.176546" + app:mapbox_center_longitude="-3.599007" + app:mapbox_style_url="@string/mapbox_style_emerald" + app:mapbox_zoom="15" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml index 086b18fea1..9cb9f4dbd6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml @@ -16,10 +16,10 @@ android:id="@id/mapView" android:layout_below="@id/toolbar" android:layout_width="match_parent" - app:center_latitude="52.519003" - app:center_longitude="13.400972" - app:style_url="@string/style_mapbox_streets" - app:zoom="16" + app:mapbox_center_latitude="52.519003" + app:mapbox_center_longitude="13.400972" + app:mapbox_style_url="@string/mapbox_style_mapbox_streets" + app:mapbox_zoom="16" android:layout_height="match_parent"/> <android.support.design.widget.FloatingActionButton diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml index 8fa94041ff..2d18e4cda3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml @@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" - app:style_url="@string/style_light" /> + app:mapbox_style_url="@string/mapbox_style_light" /> <FrameLayout android:id="@+id/container" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml index 979b30d2b4..6c8df08a20 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml @@ -27,11 +27,11 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/toolbar" - mapbox:attribution_gravity="top" - mapbox:center_latitude="34.4021" - mapbox:center_longitude="-119.7081" - mapbox:logo_gravity="top" - mapbox:style_url="mapbox://styles/mapbox/streets-v9" - mapbox:zoom="13" /> + mapbox:mapbox_attribution_gravity="top" + mapbox:mapbox_center_latitude="34.4021" + mapbox:mapbox_center_longitude="-119.7081" + mapbox:mapbox_logo_gravity="top" + mapbox:mapbox_style_url="mapbox://styles/mapbox/streets-v9" + mapbox:mapbox_zoom="13" /> </RelativeLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_dialog_map.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_dialog_map.xml index 51ec3c4677..afdd6f38f7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_dialog_map.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_dialog_map.xml @@ -10,9 +10,9 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - mapbox:center_latitude="47.6077" - mapbox:center_longitude="-122.3421" - mapbox:style_url="mapbox://styles/mapbox/streets-v9" - mapbox:zoom="11"/> + mapbox:mapbox_center_latitude="47.6077" + mapbox:mapbox_center_longitude="-122.3421" + mapbox:mapbox_style_url="mapbox://styles/mapbox/streets-v9" + mapbox:mapbox_zoom="11"/> </LinearLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java index bce020255e..4454b252ed 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java @@ -46,11 +46,11 @@ public class CameraPositionTest { float tilt = 44; TypedArray typedArray = mock(TypedArray.class); - when(typedArray.getFloat(R.styleable.MapView_direction, 0.0f)).thenReturn(bearing); - when(typedArray.getFloat(R.styleable.MapView_center_latitude, 0.0f)).thenReturn(latitude); - when(typedArray.getFloat(R.styleable.MapView_center_longitude, 0.0f)).thenReturn(longitude); - when(typedArray.getFloat(R.styleable.MapView_zoom, 0.0f)).thenReturn(zoom); - when(typedArray.getFloat(R.styleable.MapView_tilt, 0.0f)).thenReturn(tilt); + when(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_direction, 0.0f)).thenReturn(bearing); + when(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_center_latitude, 0.0f)).thenReturn(latitude); + when(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_center_longitude, 0.0f)).thenReturn(longitude); + when(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_zoom, 0.0f)).thenReturn(zoom); + when(typedArray.getFloat(R.styleable.mapbox_MapView_mapbox_tilt, 0.0f)).thenReturn(tilt); doNothing().when(typedArray).recycle(); CameraPosition cameraPosition = new CameraPosition.Builder(typedArray).build(); diff --git a/platform/android/MapboxGLAndroidSDKWearTestApp/src/main/res/layout/activity_simple_mapview.xml b/platform/android/MapboxGLAndroidSDKWearTestApp/src/main/res/layout/activity_simple_mapview.xml index 2c1e5fe2eb..d3d49f2f34 100644 --- a/platform/android/MapboxGLAndroidSDKWearTestApp/src/main/res/layout/activity_simple_mapview.xml +++ b/platform/android/MapboxGLAndroidSDKWearTestApp/src/main/res/layout/activity_simple_mapview.xml @@ -13,10 +13,10 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - mapbox:center_latitude="40.73581" - mapbox:center_longitude="-73.99155" - mapbox:style_url="mapbox://styles/mapbox/streets-v9" - mapbox:zoom="11" - mapbox:zoom_controls_enabled="false"/> + mapbox:mapbox_center_latitude="40.73581" + mapbox:mapbox_center_longitude="-73.99155" + mapbox:mapbox_style_url="mapbox://styles/mapbox/streets-v9" + mapbox:mapbox_zoom="11" + mapbox:mapbox_zoom_controls_enabled="false"/> </FrameLayout>
\ No newline at end of file |