[android] - fix public xml api for drawables, fixup QueryRenderedFeatursBoxSymbolCountActivity (#6879)

This commit is contained in:
Tobrun
2016-11-02 16:20:47 +01:00
committed by GitHub
parent 4d0c42e36a
commit 7534aa1594
16 changed files with 20 additions and 20 deletions

View File

@@ -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.mapbox_mylocationview_icon_default);
foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_default);
}
if (foregroundBearingDrawable == null) {
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing);
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_bearing);
}
options.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable);
}
if (options.getMyLocationBackgroundDrawable() == null) {
options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape));
options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_bg_shape));
}
return map = new MapView(inflater.getContext(), options);

View File

@@ -218,17 +218,17 @@ public class MapboxMapOptions implements Parcelable {
Drawable foregroundDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_foreground);
if (foregroundDrawable == null) {
foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_default);
foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_default);
}
Drawable foregroundBearingDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_foreground_bearing);
if (foregroundBearingDrawable == null) {
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing);
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_bearing);
}
Drawable backgroundDrawable = typedArray.getDrawable(R.styleable.mapbox_MapView_mapbox_my_location_background);
if (backgroundDrawable == null) {
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape);
backgroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_bg_shape);
}
mapboxMapOptions.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable);

View File

@@ -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.mapbox_mylocationview_icon_default);
foregroundDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_default);
}
if (foregroundBearingDrawable == null) {
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_icon_bearing);
foregroundBearingDrawable = ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_icon_bearing);
}
options.myLocationForegroundDrawables(foregroundDrawable, foregroundBearingDrawable);
}
if (options.getMyLocationBackgroundDrawable() == null) {
options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocationview_bg_shape));
options.myLocationBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.mapbox_mylocation_bg_shape));
}
return map = new MapView(inflater.getContext(), options);