diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle index 0cb6e529f1e..5e7025c4c86 100644 --- a/platform/android/MapboxGLAndroidSDK/build.gradle +++ b/platform/android/MapboxGLAndroidSDK/build.gradle @@ -116,7 +116,7 @@ android { } lintOptions { - baseline file("lint-baseline.xml") + baseline file("lint-baseline-local.xml") checkAllWarnings true warningsAsErrors true } diff --git a/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml b/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml new file mode 100644 index 00000000000..0a76f535056 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml b/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml index 4dc8ecde707..fd65c9f6277 100644 --- a/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml +++ b/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml @@ -1,5 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java index 3af79215961..70b13f05fb4 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk; +import android.annotation.SuppressLint; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; @@ -26,6 +27,7 @@ @UiThread public final class Mapbox { + @SuppressLint("StaticFieldLeak") private static Mapbox INSTANCE; private Context context; private String accessToken; 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 f9ca9bf4ccf..3c9cb31211b 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 @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk.annotations; +import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -35,6 +36,7 @@ public final class IconFactory { public static final String ICON_MARKERVIEW_ID = ICON_ID_PREFIX + "marker_view"; private Context context; + @SuppressLint("StaticFieldLeak") private static IconFactory instance; private Icon defaultMarker; private Icon defaultMarkerView; diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java index 9c8cda5544b..91a235616a4 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java @@ -109,13 +109,11 @@ public void cancel() { @Override public void onResponse(Call call, Response response) throws IOException { if (response.isSuccessful()) { - Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code())); + Timber.v("[HTTP] Request was successful (code = %s).", response.code()); } else { // We don't want to call this unsuccessful because a 304 isn't really an error String message = !TextUtils.isEmpty(response.message()) ? response.message() : "No additional information"; - Timber.d(String.format( - "[HTTP] Request with response code = %d: %s", - response.code(), message)); + Timber.d("[HTTP] Request with response code = %s: %s", response.code(), message); } byte[] body; @@ -160,15 +158,12 @@ private void onFailure(Exception e) { String errorMessage = e.getMessage() != null ? e.getMessage() : "Error processing the request"; if (type == TEMPORARY_ERROR) { - Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE, - "Request failed due to a temporary error: %s", errorMessage)); + Timber.d("Request failed due to a temporary error: %s", errorMessage); } else if (type == CONNECTION_ERROR) { - Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE, - "Request failed due to a connection error: %s", errorMessage)); + Timber.i("Request failed due to a connection error: %s", errorMessage); } else { // PERMANENT_ERROR - Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE, - "Request failed due to a permanent error: %s", errorMessage)); + Timber.w("Request failed due to a permanent error: %s", errorMessage); } mLock.lock(); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index f47fcdfd4ac..3b8bc16bb31 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -272,7 +272,6 @@ public void setPrefetchesTiles(boolean enable) { * Check whether tile pre-fetching is enabled or not. * * @return true if enabled - * * @see MapboxMap#setPrefetchesTiles(boolean) */ @UiThread @@ -316,7 +315,7 @@ public T getLayerAs(@NonNull String layerId) { // noinspection unchecked return (T) nativeMapView.getLayer(layerId); } catch (ClassCastException exception) { - Timber.e(String.format("Layer: %s is a different type: %s", layerId, exception)); + Timber.e(exception, "Layer: %s is a different type: ", layerId); return null; } } @@ -437,7 +436,7 @@ public T getSourceAs(@NonNull String sourceId) { // noinspection unchecked return (T) nativeMapView.getSource(sourceId); } catch (ClassCastException exception) { - Timber.e(String.format("Source: %s is a different type: %s", sourceId, exception)); + Timber.e(exception, "Source: %s is a different type: ", sourceId); return null; } } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java index 52596358e2c..ddeb4b326e3 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java @@ -17,7 +17,6 @@ import com.mapbox.mapboxsdk.annotations.Polygon; import com.mapbox.mapboxsdk.annotations.Polyline; import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.constants.MapboxConstants; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.geometry.ProjectedMeters; @@ -84,9 +83,10 @@ public NativeMapView(MapView mapView) { private boolean isDestroyedOn(String callingMethod) { if (destroyed && !TextUtils.isEmpty(callingMethod)) { - Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE, + Timber.e( "You're calling `%s` after the `MapView` was destroyed, were you invoking it after `onDestroy()`?", - callingMethod)); + callingMethod + ); } return destroyed; } @@ -143,14 +143,14 @@ public void resizeView(int width, int height) { if (width > 65535) { // we have seen edge cases where devices return incorrect values #6111 Timber.e("Device returned an out of range width size, " - + "capping value at 65535 instead of " + width); + + "capping value at 65535 instead of %s", width); width = 65535; } if (height > 65535) { // we have seen edge cases where devices return incorrect values #6111 Timber.e("Device returned an out of range height size, " - + "capping value at 65535 instead of " + height); + + "capping value at 65535 instead of %s", height); height = 65535; } nativeResizeView(width, height); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java index d788b7772b5..6f63c2eba8f 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java @@ -346,7 +346,7 @@ public void onMapChanged(int change) { void setMinZoom(double minZoom) { if ((minZoom < MapboxConstants.MINIMUM_ZOOM) || (minZoom > MapboxConstants.MAXIMUM_ZOOM)) { - Timber.e("Not setting minZoomPreference, value is in unsupported range: " + minZoom); + Timber.e("Not setting minZoomPreference, value is in unsupported range: %s", minZoom); return; } mapView.setMinZoom(minZoom); @@ -358,7 +358,7 @@ void setMinZoom(double minZoom) { void setMaxZoom(double maxZoom) { if ((maxZoom < MapboxConstants.MINIMUM_ZOOM) || (maxZoom > MapboxConstants.MAXIMUM_ZOOM)) { - Timber.e("Not setting maxZoomPreference, value is in unsupported range: " + maxZoom); + Timber.e("Not setting maxZoomPreference, value is in unsupported range: %s", maxZoom); return; } mapView.setMaxZoom(maxZoom); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java index 017fdb353ae..4e696fb56b6 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java @@ -1,6 +1,7 @@ package com.mapbox.mapboxsdk.maps.widgets; import android.animation.ValueAnimator; +import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Camera; import android.graphics.Canvas; @@ -775,6 +776,7 @@ private static class GpsLocationListener implements LocationEngineListener { locationSource = new WeakReference<>(locationEngine); } + @SuppressLint("MissingPermission") @Override public void onConnected() { MyLocationView locationView = userLocationView.get(); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java index a1bd98b7805..817dcdb4384 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk.net; +import android.annotation.SuppressLint; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -21,6 +22,7 @@ * Not public api. */ public class ConnectivityReceiver extends BroadcastReceiver { + @SuppressLint("StaticFieldLeak") private static ConnectivityReceiver INSTANCE; /** @@ -82,7 +84,7 @@ public void deactivate() { @Override public void onReceive(Context context, Intent intent) { boolean connected = isConnected(context); - Timber.v("Connected: " + connected); + Timber.v("Connected: %s", connected); // Loop over listeners for (ConnectivityListener listener : listeners) { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java index 1e6f44f0945..130284e88d2 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk.offline; +import android.annotation.SuppressLint; import android.content.Context; import android.os.Handler; import android.os.Looper; @@ -40,6 +41,7 @@ public class OfflineManager { private Handler handler; // This object is implemented as a singleton + @SuppressLint("StaticFieldLeak") private static OfflineManager instance; // The application context @@ -90,11 +92,11 @@ public interface CreateOfflineRegionCallback { */ private OfflineManager(Context context) { this.context = context.getApplicationContext(); - this.fileSource = FileSource.getInstance(context); + this.fileSource = FileSource.getInstance(this.context); initialize(fileSource); // Delete any existing previous ambient cache database - deleteAmbientDatabase(context); + deleteAmbientDatabase(this.context); } private void deleteAmbientDatabase(final Context context) { @@ -107,10 +109,10 @@ public void run() { File file = new File(path); if (file.exists()) { file.delete(); - Timber.d("Old ambient cache database deleted to save space: " + path); + Timber.d("Old ambient cache database deleted to save space: %s", path); } } catch (Exception exception) { - Timber.e("Failed to delete old ambient cache database: ", exception); + Timber.e(exception, "Failed to delete old ambient cache database: "); } } }).start(); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java index eafef80e8d1..a968cdf192e 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java @@ -72,9 +72,9 @@ public static String getCachePath(Context context) { MapboxConstants.KEY_META_DATA_SET_STORAGE_EXTERNAL, MapboxConstants.DEFAULT_SET_STORAGE_EXTERNAL); } catch (PackageManager.NameNotFoundException exception) { - Timber.e("Failed to read the package metadata: ", exception); + Timber.e(exception,"Failed to read the package metadata: "); } catch (Exception exception) { - Timber.e("Failed to read the storage key: ", exception); + Timber.e(exception, "Failed to read the storage key: "); } String cachePath = null; @@ -83,7 +83,7 @@ public static String getCachePath(Context context) { // Try getting the external storage path cachePath = context.getExternalFilesDir(null).getAbsolutePath(); } catch (NullPointerException exception) { - Timber.e("Failed to obtain the external storage path: ", exception); + Timber.e(exception, "Failed to obtain the external storage path: "); } } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java index e1e40821b1e..e7bb52ebb38 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java @@ -279,7 +279,7 @@ public S getStopsAs() { // noinspection unchecked return (S) stops; } catch (ClassCastException exception) { - Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception)); + Timber.e(exception, "Stops: %s is a different type: ", stops.getClass()); return null; } } 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 3decd6ead11..d59eef74271 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml @@ -83,11 +83,13 @@ - + + + diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml deleted file mode 100644 index 4c733ed112b..00000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-nodpi/mapbox_mapview_preview.jpg similarity index 100% rename from platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg rename to platform/android/MapboxGLAndroidSDK/src/main/res/drawable-nodpi/mapbox_mapview_preview.jpg diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png deleted file mode 100644 index 584b3202994..00000000000 Binary files a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png and /dev/null differ diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml index 763bb118e06..648946e8ce8 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml @@ -9,5 +9,6 @@ android:paddingLeft="24dp" android:paddingRight="24dp" android:textAllCaps="true" + android:textIsSelectable="true" android:textAppearance="?android:attr/textAppearanceButton" android:textColor="@color/mapbox_blue"/> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml index 26c974dc0d0..027f3690d57 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml @@ -23,6 +23,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="2dp" + android:textIsSelectable="true" android:maxEms="17" android:textColor="@android:color/black" android:textSize="18sp" @@ -34,13 +35,13 @@ android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:layout_marginTop="2dp" + android:textIsSelectable="true" android:lineSpacingExtra="1dp" android:maxEms="17" android:textColor="@color/mapbox_gray" android:textSize="14sp"/> + android:id="@+id/image" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@null"/> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml index 63ef42c2c33..68e70e948e0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml @@ -3,5 +3,4 @@ #7D7F80 #EEEEEE #1E8CAB - @color/mapbox_blue diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml index 8edbd47c297..1c6a265587c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml @@ -2,17 +2,8 @@ 8dp 8dp - -2dp - 1.5dp - @dimen/mapbox_two_dp - @dimen/mapbox_two_dp - @dimen/mapbox_two_dp - @dimen/mapbox_two_dp - 2dp 4dp 8dp - 10dp - 16dp 92dp 18dp diff --git a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle index b13362751a1..360cb36067f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle +++ b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle @@ -25,12 +25,10 @@ android { } lintOptions { - baseline file("lint-baseline.xml") + baseline file("lint-baseline-local.xml") checkAllWarnings true warningsAsErrors true - disable 'MissingTranslation' - disable 'IconDensities' - disable 'InvalidPackage' + disable 'MissingTranslation', 'GoogleAppIndexingWarning', 'UnpackedNativeCode', 'IconDipSize' } buildTypes { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/lint-baseline-local.xml b/platform/android/MapboxGLAndroidSDKTestApp/lint-baseline-local.xml new file mode 100644 index 00000000000..e3c5abce4f1 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/lint-baseline-local.xml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml b/platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml index 89eab70c48d..64e3d41bcc3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml @@ -1,2569 +1,177 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + errorLine1=" android:background="#cccc"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~" + id="Overdraw" + message="Possible overdraw: Root element paints background `#cccc` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"> + column="5" + file="src/main/res/layout/drawer_navigation_drawer.xml" + line="4"/> + errorLine1=" android:background="?android:attr/selectableItemBackground"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + id="Overdraw" + message="Possible overdraw: Root element paints background `?android:attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"> + column="5" + file="src/main/res/layout/item_main_feature.xml" + line="6"/> + errorLine1=" android:background="@color/mapboxGreen">" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + id="Overdraw" + message="Possible overdraw: Root element paints background `@color/mapboxGreen` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"> + column="5" + file="src/main/res/layout/view_text_marker.xml" + line="5"/> + errorLine1=" <string name="mapbox_attributionTelemetryMessage">Estàs ajudant a millorar els mapes d\'OpenStreetMap i de Mapbox aportant dades d\'ús anònimes.</string>" + errorLine2=" ^" + id="TypographyQuotes" + message="Replace straight quotes ('') with directional quotes (‘’, &#8216; and &#8217;) ?"> + column="55" + file="src/main/res/values-ca/strings.xml" + line="9"/> + id="IconDipSize" + message="The image `icon_burned.png` varies significantly in its density-independent (dip) size across the various density versions: drawable-hdpi/icon_burned.png: 64x64 dp (96x96 px), drawable-xxxhdpi/icon_burned.png: 48x48 dp (192x192 px), drawable-xxhdpi/icon_burned.png: 48x48 dp (144x144 px), drawable-xhdpi/icon_burned.png: 48x48 dp (96x96 px), drawable-mdpi/icon_burned.png: 48x48 dp (48x48 px)"> - - - + file="src/main/res/drawable-mdpi/icon_burned.png"/> - - - + file="src/main/res/drawable-xhdpi/icon_burned.png"/> - - - + file="src/main/res/drawable-xxhdpi/icon_burned.png"/> - - - + file="src/main/res/drawable-xxxhdpi/icon_burned.png"/> + file="src/main/res/drawable-hdpi/icon_burned.png"/> + id="IconDuplicatesConfig" + message="The `icon_burned.png` icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi"> - - - + file="src/main/res/drawable-xhdpi/icon_burned.png"/> + file="src/main/res/drawable-hdpi/icon_burned.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-hdpi/ic_launcher_round.png`: expected 72x72, but was 216x216"> + file="src/main/res/drawable-hdpi/ic_launcher_round.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-mdpi/ic_launcher_round.png`: expected 48x48, but was 144x144"> + file="src/main/res/drawable-mdpi/ic_launcher_round.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xhdpi/ic_launcher_round.png`: expected 96x96, but was 288x288"> + file="src/main/res/drawable-xhdpi/ic_launcher_round.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xxhdpi/ic_launcher_round.png`: expected 144x144, but was 432x432"> + file="src/main/res/drawable-xxhdpi/ic_launcher_round.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xxxhdpi/ic_launcher_round.png`: expected 192x192, but was 576x576"> + file="src/main/res/drawable-xxxhdpi/ic_launcher_round.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-hdpi/icon.png`: expected 72x72, but was 215x212"> + file="src/main/res/drawable-hdpi/icon.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-mdpi/icon.png`: expected 48x48, but was 143x141"> + file="src/main/res/drawable-mdpi/icon.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xhdpi/icon.png`: expected 96x96, but was 286x282"> + file="src/main/res/drawable-xhdpi/icon.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xxhdpi/icon.png`: expected 144x144, but was 429x423"> + file="src/main/res/drawable-xxhdpi/icon.png"/> + id="IconExpectedSize" + message="Incorrect icon size for `drawable-xxxhdpi/icon.png`: expected 192x192, but was 572x564"> + file="src/main/res/drawable-xxxhdpi/icon.png"/> + id="IconDensities" + message="Missing the following drawables in `drawable-hdpi`: ic_car_top.png, ic_taxi_top.png, ic_us.png, southeast_radar_0.png, southeast_radar_1.png... (2 more)"> + file="src/main/res/drawable-hdpi"/> + id="IconDensities" + message="Missing the following drawables in `drawable-mdpi`: ic_car_top.png, ic_taxi_top.png, ic_us.png"> + file="src/main/res/drawable-mdpi"/> + id="IconDensities" + message="Missing the following drawables in `drawable-xhdpi`: ic_car_top.png, ic_taxi_top.png, ic_us.png, southeast_radar_0.png, southeast_radar_1.png... (2 more)"> + file="src/main/res/drawable-xhdpi"/> + id="IconDensities" + message="Missing the following drawables in `drawable-xxhdpi`: ic_car_top.png, ic_taxi_top.png, southeast_radar_0.png, southeast_radar_1.png, southeast_radar_2.png... (1 more)"> + file="src/main/res/drawable-xxhdpi"/> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/MyLocationViewTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/MyLocationViewTest.java index fa19235ad07..ec7105c321c 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/MyLocationViewTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/MyLocationViewTest.java @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk.testapp.maps.widgets; +import android.annotation.SuppressLint; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; @@ -97,6 +98,7 @@ public String getDescription() { return getClass().getSimpleName(); } + @SuppressLint("MissingPermission") @Override public void perform(UiController uiController, View view) { if (isEnabled) { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/OnMapReadyIdlingResource.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/OnMapReadyIdlingResource.java index 6e582c6a3a8..3148ec6793e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/OnMapReadyIdlingResource.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/OnMapReadyIdlingResource.java @@ -43,10 +43,10 @@ private boolean isMapboxMapReady() { Field field = activity.getClass().getDeclaredField("mapboxMap"); field.setAccessible(true); mapboxMap = (MapboxMap) field.get(activity); - Timber.e("isMapboxReady called with value " + (mapboxMap != null)); + Timber.e("isMapboxReady called with value %s", (mapboxMap != null)); return mapboxMap != null; } catch (Exception exception) { - Timber.e("could not reflect", exception); + Timber.e(exception, "could not reflect"); return false; } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MapboxApplication.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MapboxApplication.java index deee312bb3f..fba33bb3806 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MapboxApplication.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MapboxApplication.java @@ -3,7 +3,6 @@ import android.app.Application; import android.os.StrictMode; import android.text.TextUtils; -import android.util.Log; import com.mapbox.mapboxsdk.Mapbox; import com.mapbox.mapboxsdk.testapp.utils.TokenUtils; @@ -21,7 +20,6 @@ */ public class MapboxApplication extends Application { - private static final String LOG_TAG = MapboxApplication.class.getSimpleName(); private static final String DEFAULT_MAPBOX_ACCESS_TOKEN = "YOUR_MAPBOX_ACCESS_TOKEN_GOES_HERE"; private static final String ACCESS_TOKEN_NOT_SET_MESSAGE = "In order to run the Test App you need to set a valid " + "access token. During development, you can set the MAPBOX_ACCESS_TOKEN environment variable for the SDK to " @@ -55,7 +53,7 @@ public void onCreate() { String mapboxAccessToken = TokenUtils.getMapboxAccessToken(getApplicationContext()); if (TextUtils.isEmpty(mapboxAccessToken) || mapboxAccessToken.equals(DEFAULT_MAPBOX_ACCESS_TOKEN)) { - Log.w(LOG_TAG, ACCESS_TOKEN_NOT_SET_MESSAGE); + Timber.e(ACCESS_TOKEN_NOT_SET_MESSAGE); } Mapbox.getInstance(getApplicationContext(), mapboxAccessToken); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java index f8617366a02..3f20f19f5dd 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java @@ -92,7 +92,7 @@ private void loadFeatures() { getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_ACTIVITIES | PackageManager.GET_META_DATA)); } catch (PackageManager.NameNotFoundException exception) { - Timber.e("Could not resolve package info", exception); + Timber.e(exception, "Could not resolve package info"); } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java index 27958c3d0c9..d54063a77ec 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java @@ -115,14 +115,14 @@ private void showLowThresholdMarker() { isShowingHighThresholdMarker = false; if (activeMarker != null) { - Timber.d("Remove marker with " + activeMarker.getId()); + Timber.d("Remove marker with id %s", activeMarker.getId()); mapboxMap.removeMarker(activeMarker); } else { Timber.e("active marker is null"); } activeMarker = mapboxMap.addMarker(lowThresholdMarker); - Timber.d("showLowThresholdMarker() " + activeMarker.getId()); + Timber.d("showLowThresholdMarker() with id %s ", activeMarker.getId()); } private void showHighThresholdMarker() { @@ -134,14 +134,14 @@ private void showHighThresholdMarker() { isShowingHighThresholdMarker = true; if (activeMarker != null) { - Timber.d("Remove marker with " + activeMarker.getId()); + Timber.d("Remove marker with id %s", activeMarker.getId()); mapboxMap.removeMarker(activeMarker); } else { Timber.e("active marker is null"); } activeMarker = mapboxMap.addMarker(highThresholdMarker); - Timber.d("showHighThresholdMarker() " + activeMarker.getId()); + Timber.d("showHighThresholdMarker() with id %s", activeMarker.getId()); } @Override diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java index 8b238e49a8f..50adeb2d74f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java @@ -274,7 +274,7 @@ protected List doInBackground(Void... params) { String json = GeoParseUtil.loadStringFromAssets(activity.getApplicationContext(), "points.geojson"); return GeoParseUtil.parseGeoJsonCoordinates(json); } catch (IOException | JSONException exception) { - Timber.e("Could not add markers,", exception); + Timber.e(exception, "Could not add markers"); return null; } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java index f2f82865d19..61ece0a94fe 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java @@ -36,6 +36,7 @@ import com.mapbox.mapboxsdk.testapp.model.annotations.TextMarkerView; import com.mapbox.mapboxsdk.testapp.model.annotations.TextMarkerViewOptions; +import java.util.Locale; import java.util.Random; /** @@ -150,7 +151,11 @@ public void onMapReady(@NonNull MapboxMap mapboxMap) { public void onMapChanged(@MapView.MapChange int change) { if (change == MapView.REGION_IS_CHANGING || change == MapView.REGION_DID_CHANGE) { if (!markerViewManager.getMarkerViewAdapters().isEmpty() && viewCountView != null) { - viewCountView.setText("ViewCache size " + markerViewContainer.getChildCount()); + viewCountView.setText(String.format( + Locale.getDefault(), + getString(R.string.viewcache_size), + markerViewContainer.getChildCount()) + ); } } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewsInRectangleActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewsInRectangleActivity.java index 266db3fdd1d..a8a5054eaf4 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewsInRectangleActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewsInRectangleActivity.java @@ -53,7 +53,7 @@ public void onClick(View view) { int top = selectionBox.getTop() - mapView.getTop(); int left = selectionBox.getLeft() - mapView.getLeft(); RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight()); - Timber.i(String.format("Querying box %s", box)); + Timber.i("Querying box %s", box); List markers = mapboxMap.getMarkerViewsInRect(box); // Show count 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 cb2f57d8604..f82e9573f2f 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 @@ -1,5 +1,6 @@ package com.mapbox.mapboxsdk.testapp.activity.camera; +import android.annotation.SuppressLint; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; @@ -83,6 +84,7 @@ public void onCameraMoveStarted(int reason) { fab = (FloatingActionButton) findViewById(R.id.fab); fab.setColorFilter(ContextCompat.getColor(CameraPositionActivity.this, R.color.primary)); fab.setOnClickListener(new View.OnClickListener() { + @SuppressLint("InflateParams") @Override public void onClick(View view) { Context context = view.getContext(); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java index 9c031ad32a8..20174daeaa9 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxCountActivity.java @@ -48,7 +48,7 @@ public void onClick(View view) { int top = selectionBox.getTop() - mapView.getTop(); int left = selectionBox.getLeft() - mapView.getLeft(); RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight()); - Timber.i(String.format("Querying box %s", box)); + Timber.i("Querying box %s", box); List features = mapboxMap.queryRenderedFeatures(box); // Show count @@ -66,22 +66,21 @@ public void onClick(View view) { } private void debugOutput(List features) { - Timber.i(String.format("Got %s features", features.size())); + Timber.i("Got %s features", features.size()); for (Feature feature : features) { if (feature != null) { - Timber.i(String.format("Got feature %s with %s properties and Geometry %s", + Timber.i("Got feature %s with %s properties and Geometry %s", feature.getId(), feature.getProperties() != null ? feature.getProperties().entrySet().size() : "", - feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "") + feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "" ); if (feature.getProperties() != null) { for (Map.Entry entry : feature.getProperties().entrySet()) { - Timber.i(String.format("Prop %s - %s", entry.getKey(), entry.getValue())); + Timber.i("Prop %s - %s", entry.getKey(), entry.getValue()); } } } else { - // TODO Question: Why not formatting here?? - Timber.i("Got NULL feature %s"); + Timber.i("Got 0 features"); } } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java index 1d15efef84a..a909bb71516 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxHighlightActivity.java @@ -53,7 +53,7 @@ public void onClick(View view) { int top = selectionBox.getTop() - mapView.getTop(); int left = selectionBox.getLeft() - mapView.getLeft(); RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight()); - Timber.i(String.format("Querying box %s for buildings", box)); + Timber.i("Querying box %s for buildings", box); List features = mapboxMap.queryRenderedFeatures(box, Filter.lt("height", 10), "building"); // Show count diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java index 8c2f3a8fb50..251a3855f0d 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesBoxSymbolCountActivity.java @@ -59,7 +59,7 @@ public void onMapReady(final MapboxMap mapboxMap) { try { mapboxMap.addSource(new GeoJsonSource("symbols-source", readRawResource(R.raw.test_points_utrecht))); } catch (IOException ioException) { - Timber.e("Could not load geojson: " + ioException.getMessage()); + Timber.e(ioException,"Could not load geojson"); return; } mapboxMap.addImage( @@ -76,7 +76,7 @@ public void onClick(View view) { int top = selectionBox.getTop() - mapView.getTop(); int left = selectionBox.getLeft() - mapView.getLeft(); RectF box = new RectF(left, top, left + selectionBox.getWidth(), top + selectionBox.getHeight()); - Timber.i(String.format("Querying box %s", box)); + Timber.i("Querying box %s", box); List features = mapboxMap.queryRenderedFeatures(box, "symbols-layer"); // Show count diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java index 8b83db30690..1bd6a34b7c0 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java @@ -59,9 +59,9 @@ public void onMapReady(final MapboxMap mapboxMap) { public void onMapClick(@NonNull LatLng point) { // Query final PointF pixel = mapboxMap.getProjection().toScreenLocation(point); - Timber.i(String.format( + Timber.i( "Requesting features for %sx%s (%sx%s adjusted for density)", - pixel.x, pixel.y, pixel.x / density, pixel.y / density) + pixel.x, pixel.y, pixel.x / density, pixel.y / density ); List features = mapboxMap.queryRenderedFeatures(pixel); @@ -84,22 +84,21 @@ public void onMapClick(@NonNull LatLng point) { } private void debugOutput(List features) { - Timber.i(String.format("Got %s features", features.size())); + Timber.i("Got %s features", features.size()); for (Feature feature : features) { if (feature != null) { - Timber.i(String.format("Got feature %s with %s properties and Geometry %s", + Timber.i("Got feature %s with %s properties and Geometry %s", feature.getId(), feature.getProperties() != null ? feature.getProperties().entrySet().size() : "", - feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "") + feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "" ); if (feature.getProperties() != null) { for (Map.Entry entry : feature.getProperties().entrySet()) { - Timber.i(String.format("Prop %s - %s", entry.getKey(), entry.getValue())); + Timber.i("Prop %s - %s", entry.getKey(), entry.getValue()); } } } else { - // TODO Question: Why not formatting here?? - Timber.i("Got NULL feature %s"); + Timber.i("Got NULL feature"); } } } @@ -185,7 +184,7 @@ private static class CustomMarker extends Marker { private final List features; - public CustomMarker(BaseMarkerOptions baseMarkerOptions, List features) { + CustomMarker(BaseMarkerOptions baseMarkerOptions, List features) { super(baseMarkerOptions); this.features = features; } @@ -201,7 +200,7 @@ public CustomMarkerOptions features(List features) { return this; } - public CustomMarkerOptions() { + CustomMarkerOptions() { } private CustomMarkerOptions(Parcel in) { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.java index 2be47b4e25b..655012f799b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.java @@ -15,6 +15,8 @@ import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; import com.mapbox.mapboxsdk.testapp.R; +import java.util.Locale; + /** * Test activity showcasing the Snapshot API to create and display a bitmap of the current shown Map. */ @@ -56,7 +58,7 @@ public void onSnapshotReady(Bitmap snapshot) { snapshotView.setImageBitmap(snapshot); Toast.makeText( SnapshotActivity.this, - String.format("Snapshot taken in %d ms", duration), + String.format(Locale.getDefault(), "Snapshot taken in %d ms", duration), Toast.LENGTH_LONG).show(); } }); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java index 18db2ba8a81..e8525b6a620 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java @@ -21,6 +21,8 @@ import com.mapbox.mapboxsdk.testapp.R; import com.mapbox.mapboxsdk.testapp.utils.IconUtils; +import java.util.Locale; + /** * Test activity showcasing how to dynamically update InfoWindow when Using an MapboxMap.InfoWindowAdapter. */ @@ -69,7 +71,7 @@ public void onMapClick(@NonNull LatLng point) { // Get the view from the info window if (infoWindow != null && infoWindow.getView() != null) { // Set the new text on the text view in the info window - ((TextView) infoWindow.getView()).setText(String.format("%.2fkm", distanceKm)); + ((TextView) infoWindow.getView()).setText(String.format(Locale.getDefault(), "%.2fkm", distanceKm)); // Update the info window position (as the text length changes) infoWindow.update(); @@ -100,9 +102,8 @@ public View getInfoWindow(@NonNull Marker marker) { TextView textView = new TextView(DynamicInfoWindowAdapterActivity.this); textView.setText(marker.getTitle()); textView.setBackgroundColor(Color.WHITE); - textView.setText("Click the map to calculate the distance"); + textView.setText(R.string.action_calculate_distance); textView.setPadding(padding, padding, padding, padding); - return textView; } }); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java index 18d6fadcb87..dea1abea8e1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java @@ -69,7 +69,7 @@ public void onCameraChange(CameraPosition position) { @Override public void onClick(View view) { if (mapboxMap != null) { - Timber.d("Debug FAB: isDebug Active? " + mapboxMap.isDebugActive()); + Timber.d("Debug FAB: isDebug Active? %s" , mapboxMap.isDebugActive()); mapboxMap.cycleDebugOptions(); } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/OfflineActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/OfflineActivity.java index 344e9e140a3..5bffd4d930f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/OfflineActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/OfflineActivity.java @@ -12,7 +12,6 @@ import com.mapbox.mapboxsdk.Mapbox; import com.mapbox.mapboxsdk.camera.CameraPosition; import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; -import com.mapbox.mapboxsdk.constants.MapboxConstants; import com.mapbox.mapboxsdk.constants.Style; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; @@ -75,8 +74,7 @@ protected void onCreate(Bundle savedInstanceState) { // state of your app. This will override any checks performed via the ConnectivityManager. // Mapbox.getInstance().setConnected(false); Boolean connected = Mapbox.isConnected(); - Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE, - "Mapbox is connected: %b", connected)); + Timber.d("Mapbox is connected: %s", connected); // Set up map mapView = (MapView) findViewById(R.id.mapView); @@ -207,7 +205,7 @@ public void onList(OfflineRegion[] offlineRegions) { @Override public void onError(String error) { - Timber.e("Error: " + error); + Timber.e("Error: %s" , error); } }); } @@ -223,7 +221,7 @@ public void onDownloadRegionDialogPositiveClick(final String regionName) { } // Start progress bar - Timber.d("Download started: " + regionName); + Timber.d("Download started: %s", regionName); startProgress(); // Definition @@ -241,14 +239,14 @@ public void onDownloadRegionDialogPositiveClick(final String regionName) { offlineManager.createOfflineRegion(definition, metadata, new OfflineManager.CreateOfflineRegionCallback() { @Override public void onCreate(OfflineRegion offlineRegion) { - Timber.d("Offline region created: " + regionName); + Timber.d("Offline region created: %s" , regionName); OfflineActivity.this.offlineRegion = offlineRegion; launchDownload(); } @Override public void onError(String error) { - Timber.e("Error: " + error); + Timber.e("Error: %s", error); } }); } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java index 2238d1d5fe1..f99a1fdb96f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java @@ -74,7 +74,7 @@ private void addBusStopSource() { source = new GeoJsonSource("bus_stop", new URL("https://raw.githubusercontent.com/cheeaun/busrouter-sg/master/data/2/bus-stops.geojson")); } catch (MalformedURLException exception) { - Timber.e("That's not an url... ", exception); + Timber.e(exception, "That's not an url... "); } mapboxMap.addSource(source); } @@ -132,7 +132,7 @@ private void addBusRouteSource() { new URL("https://gist.githubusercontent.com/tobrun/7fbc0fe7e9ffea509f7608cda2601d5d/raw/" + "a4b8cc289020f91fa2e1553524820054395e36f5/line.geojson"))); } catch (MalformedURLException malformedUrlException) { - Timber.e("That's not an url... ", malformedUrlException); + Timber.e(malformedUrlException, "That's not an url... "); } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/GeoJsonClusteringActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/GeoJsonClusteringActivity.java index 80dfe777cba..a2111bc3048 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/GeoJsonClusteringActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/GeoJsonClusteringActivity.java @@ -128,7 +128,7 @@ private void addClusteredGeoJsonSource() { ) ); } catch (MalformedURLException malformedUrlException) { - Timber.e("That's not an url... " + malformedUrlException.getMessage()); + Timber.e(malformedUrlException,"That's not an url... "); } // Add unclustered layer diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RealTimeGeoJsonActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RealTimeGeoJsonActivity.java index b9f7ebce355..b9f1dfe810b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RealTimeGeoJsonActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RealTimeGeoJsonActivity.java @@ -55,7 +55,7 @@ public void onMapReady(@NonNull final MapboxMap map) { try { mapboxMap.addSource(new GeoJsonSource(ID_GEOJSON_SOURCE, new URL(URL_GEOJSON_SOURCE))); } catch (MalformedURLException malformedUrlException) { - Timber.e("Invalid URL", malformedUrlException); + Timber.e(malformedUrlException, "Invalid URL"); } // add layer diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java index f6754af0f93..287108c6aa6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java @@ -317,12 +317,12 @@ private void addParksLayer() { layer = mapboxMap.getLayerAs("parksLayer"); // And get some properties PropertyValue fillAntialias = layer.getFillAntialias(); - Timber.d("Fill anti alias: " + fillAntialias.getValue()); + Timber.d("Fill anti alias: %s", fillAntialias.getValue()); layer.setProperties(fillTranslateAnchor(FILL_TRANSLATE_ANCHOR_MAP)); PropertyValue fillTranslateAnchor = layer.getFillTranslateAnchor(); - Timber.d("Fill translate anchor: " + fillTranslateAnchor.getValue()); + Timber.d("Fill translate anchor: %s", fillTranslateAnchor.getValue()); PropertyValue visibility = layer.getVisibility(); - Timber.d("Visibility: " + visibility.getValue()); + Timber.d("Visibility: %s", visibility.getValue()); // Get a good look at it all mapboxMap.animateCamera(CameraUpdateFactory.zoomTo(12)); @@ -477,11 +477,11 @@ private void updateWaterColorOnZoom() { Function function = (Function) fillColor.getFunction(); if (function != null) { ExponentialStops stops = (ExponentialStops) function.getStops(); - Timber.d("Fill color base: " + stops.getBase()); - Timber.d("Fill color #stops: " + stops.size()); + Timber.d("Fill color base: %s", stops.getBase()); + Timber.d("Fill color #stops: %s", stops.size()); if (function.getStops() != null) { for (Stop stop : stops) { - Timber.d("Fill color #stops: " + stop); + Timber.d("Fill color #stops: %s", stop); } } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/StyleFileActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/StyleFileActivity.java index 6906e90f6e2..7dcae6a16d6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/StyleFileActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/StyleFileActivity.java @@ -72,7 +72,7 @@ protected Long doInBackground(Void... params) { try { cacheStyleFile = File.createTempFile("my-", ".style.json"); cacheStyleFile.createNewFile(); - Timber.i("Writing style file to: " + cacheStyleFile.getAbsolutePath()); + Timber.i("Writing style file to: %s", cacheStyleFile.getAbsolutePath()); writeToFile(cacheStyleFile, readRawResource(R.raw.local_style)); } catch (Exception exception) { Toast.makeText(StyleFileActivity.this, "Could not create style file in cache dir", Toast.LENGTH_SHORT).show(); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java index 69e6d643253..9f6f2b2fcd7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java @@ -50,7 +50,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { mapView = new MapView(this, mapboxMapOptions); mapView.setId(R.id.mapView); - ViewGroup parent = (ViewGroup) findViewById(R.id.container); + ViewGroup parent = (ViewGroup) findViewById(android.R.id.content); parent.addView(mapView); mapView.onCreate(savedInstanceState); diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java index f717daeadae..76f07ba526b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java @@ -32,7 +32,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) { .setItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - Timber.d("Selected item: " + which); + Timber.d("Selected item: %s", which); } }) .setPositiveButton("Accept", new DialogInterface.OnClickListener() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/OfflineUtils.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/OfflineUtils.java index 8c6ab3e2115..6220dc7e695 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/OfflineUtils.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/OfflineUtils.java @@ -29,7 +29,7 @@ public static byte[] convertRegionName(String regionName) { String json = jsonObject.toString(); metadata = json.getBytes(JSON_CHARSET); } catch (Exception exception) { - Timber.e("Failed to encode metadata: " + exception.getMessage()); + Timber.e(exception, "Failed to encode metadata: "); } return metadata; } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/TimingLogger.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/TimingLogger.java index 6f20d6fb0f1..235fd8233b4 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/TimingLogger.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/TimingLogger.java @@ -146,15 +146,15 @@ public void dumpToLog() { if (disabled) { return; } - Timber.d(label + ": begin"); + Timber.d("%s: begin", label); final long first = splits.get(0); long now = first; for (int i = 1; i < splits.size(); i++) { now = splits.get(i); final String splitLabel = splitLabels.get(i); final long prev = splits.get(i - 1); - Timber.d(label + ": " + (now - prev) + " ms, " + splitLabel); + Timber.d("%s: %s ms, %s", label, (now - prev), splitLabel); } - Timber.d(label + ": end, " + (now - first) + " ms"); + Timber.d("%s: end, %s ms", label, (now - first)); } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_check_box.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_check_box.xml deleted file mode 100644 index cf8bfa24b58..00000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_check_box.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml deleted file mode 100644 index 71992ebd7fc..00000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_image_source.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_image_source.xml index ac1f08e821d..cfc923902ca 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_image_source.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_animated_image_source.xml @@ -14,16 +14,4 @@ app:mapbox_cameraZoom="3" app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/> - - diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_building_layer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_building_layer.xml index fa37c485d71..c8752df1bfd 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_building_layer.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_building_layer.xml @@ -1,8 +1,6 @@ - + @@ -35,4 +33,4 @@ android:src="@drawable/ic_paint" app:backgroundTint="@color/primary"/> - + 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 b70bb6d7b2b..0cb065a6767 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 @@ -15,7 +15,9 @@ app:mapbox_cameraZoom="15"/> @@ -36,6 +37,7 @@ android:layout_marginBottom="@dimen/fab_margin" android:layout_marginRight="@dimen/fab_margin" android:src="@drawable/ic_layers" + android:layout_marginEnd="@dimen/fab_margin" app:backgroundTint="@color/primary"/> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml index 6db8b073d9c..56fe909c45f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml @@ -21,6 +21,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|start" android:layout_margin="8dp" + android:textIsSelectable="true" android:textSize="14sp"/> - +