Solve lint issues, reduce baseline (#9627)

* [android] - fix lint issues SDK
This commit is contained in:
Tobrun
2017-07-28 19:36:13 +02:00
committed by GitHub
parent ba7574ec51
commit 685b8b2c84
88 changed files with 557 additions and 3293 deletions

View File

@@ -116,7 +116,7 @@ android {
}
lintOptions {
baseline file("lint-baseline.xml")
baseline file("lint-baseline-local.xml")
checkAllWarnings true
warningsAsErrors true
}

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="4" by="lint 2.3.1">
<issue
id="MissingTranslation"
message="&quot;`mapbox_attributionErrorNoBrowser`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
errorLine1=" &lt;string name=&quot;mapbox_attributionErrorNoBrowser&quot;>No web browser installed on device, can\&apos;t open web page.&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="13"
column="13"/>
</issue>
<issue
id="MissingTranslation"
message="&quot;`mapbox_telemetrySettings`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
errorLine1=" &lt;string name=&quot;mapbox_telemetrySettings&quot;>Telemetry Settings&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="15"
column="13"/>
</issue>
<issue
id="TypographyQuotes"
message="Replace straight quotes (&apos;&apos;) with directional quotes (‘’, &amp;#8216; and &amp;#8217;) ?"
errorLine1=" &lt;string name=&quot;mapbox_attributionTelemetryMessage&quot;>Estàs ajudant a millorar els mapes d\&apos;OpenStreetMap i de Mapbox aportant dades d\&apos;ús anònimes.&lt;/string>"
errorLine2=" ^">
<location
file="src/main/res/values-ca/strings.xml"
line="9"
column="55"/>
</issue>
</issues>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- REMEMBER! First you run Lint locally you'll need to move the lint-baseline.xml file
<!-- REMEMBER! First you run Lint locally you'll need to move lint-baseline-local.xml.xml file
generated into the lint folder and called it lint-baseline-local.xml
If you remove any error when running Lint locally, you'll get a warning from the command
line advising you to remove it from the baseline. If you remove it (remember to remove it
@@ -8,94 +8,6 @@
Eventually, it'll be removed (when we remove all current lint errors included). -->
<issues format="4" by="lint 2.3.1">
<issue
id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
errorLine1=" Location lastKnownLocation = locationEngine.getLastLocation();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
line="783"
column="38"/>
</issue>
<issue
id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
errorLine1=" locationEngine.requestLocationUpdates();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
line="787"
column="9"/>
</issue>
<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
errorLine1=" Timber.v(String.format(&quot;[HTTP] Request was successful (code = %d).&quot;, response.code()));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="112"
column="16"/>
</issue>
<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
errorLine1=" Timber.d(String.format("
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="116"
column="16"/>
</issue>
<issue
id="TimberArgCount"
message="Wrong argument count, format string `Failed to read the package metadata: ` requires `0` but format call supplies `1`"
errorLine1=" Timber.e(&quot;Failed to read the package metadata: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="75"
column="7"/>
</issue>
<issue
id="TimberArgCount"
message="Wrong argument count, format string `Failed to read the storage key: ` requires `0` but format call supplies `1`"
errorLine1=" Timber.e(&quot;Failed to read the storage key: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="77"
column="7"/>
</issue>
<issue
id="TimberArgCount"
message="Wrong argument count, format string `Failed to obtain the external storage path: ` requires `0` but format call supplies `1`"
errorLine1=" Timber.e(&quot;Failed to obtain the external storage path: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="86"
column="9"/>
</issue>
<issue
id="TimberArgCount"
message="Wrong argument count, format string `Failed to delete old ambient cache database: ` requires `0` but format call supplies `1`"
errorLine1=" Timber.e(&quot;Failed to delete old ambient cache database: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
line="113"
column="11"/>
</issue>
<issue
id="MissingTranslation"
message="&quot;`mapbox_attributionErrorNoBrowser`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
@@ -118,431 +30,6 @@
column="13"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.v(&quot;Connected: &quot; + connected);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
line="85"
column="14"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.e(&quot;Device returned an out of range width size, &quot;"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
line="178"
column="16"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.e(&quot;Device returned an out of range height size, &quot;"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
line="185"
column="16"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.d(&quot;Old ambient cache database deleted to save space: &quot; + path);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
line="110"
column="22"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.e(&quot;Not setting minZoomPreference, value is in unsupported range: &quot; + minZoom);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
line="349"
column="16"/>
</issue>
<issue
id="BinaryOperationInTimber"
message="Replace String concatenation with Timber&apos;s string formatting"
errorLine1=" Timber.e(&quot;Not setting maxZoomPreference, value is in unsupported range: &quot; + maxZoom);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
line="361"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.e(String.format(&quot;Stops: %s is a different type: %s&quot;, stops.getClass(), exception));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java"
line="282"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.v(String.format(&quot;[HTTP] Request was successful (code = %d).&quot;, response.code()));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="112"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.d(String.format("
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="116"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="163"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="166"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
line="170"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.e(String.format(&quot;Layer: %s is a different type: %s&quot;, layerId, exception));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
line="286"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.e(String.format(&quot;Source: %s is a different type: %s&quot;, sourceId, exception));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
line="407"
column="16"/>
</issue>
<issue
id="StringFormatInTimber"
message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
errorLine1=" Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
line="92"
column="16"/>
</issue>
<issue
id="ThrowableNotAtBeginning"
message="Throwable should be first argument"
errorLine1=" Timber.e(&quot;Failed to read the package metadata: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="75"
column="7"/>
</issue>
<issue
id="ThrowableNotAtBeginning"
message="Throwable should be first argument"
errorLine1=" Timber.e(&quot;Failed to read the storage key: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="77"
column="7"/>
</issue>
<issue
id="ThrowableNotAtBeginning"
message="Throwable should be first argument"
errorLine1=" Timber.e(&quot;Failed to obtain the external storage path: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
line="86"
column="9"/>
</issue>
<issue
id="ThrowableNotAtBeginning"
message="Throwable should be first argument"
errorLine1=" Timber.e(&quot;Failed to delete old ambient cache database: &quot;, exception);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
line="113"
column="11"/>
</issue>
<issue
id="StaticFieldLeak"
message="Do not place Android context classes in static fields (static reference to `ConnectivityReceiver` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
errorLine1=" private static ConnectivityReceiver INSTANCE;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
line="24"
column="3"/>
</issue>
<issue
id="StaticFieldLeak"
message="Do not place Android context classes in static fields (static reference to `IconFactory` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
errorLine1=" private static IconFactory instance;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java"
line="38"
column="3"/>
</issue>
<issue
id="StaticFieldLeak"
message="Do not place Android context classes in static fields (static reference to `Mapbox` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
errorLine1=" private static Mapbox INSTANCE;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/mapbox/mapboxsdk/Mapbox.java"
line="29"
column="3"/>
</issue>
<issue
id="StaticFieldLeak"
message="Do not place Android context classes in static fields (static reference to `OfflineManager` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
errorLine1=" // This object is implemented as a singleton"
errorLine2=" ^">
<location
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
line="42"
column="3"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.color.mapbox_my_location_ring` appears to be unused"
errorLine1=" &lt;color name=&quot;mapbox_my_location_ring&quot;>@color/mapbox_blue&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/colors.xml"
line="6"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_infowindow_offset` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_infowindow_offset&quot;>-2dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="5"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_infowindow_line_width` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_infowindow_line_width&quot;>1.5dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="6"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_attribution_icon_left_padding` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_left_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="7"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_attribution_icon_top_padding` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_top_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="8"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_attribution_icon_right_padding` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_right_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="9"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_attribution_icon_bottom_padding` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_bottom_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="10"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_two_dp` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_two_dp&quot;>2dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="11"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_ten_dp` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_ten_dp&quot;>10dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="14"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.dimen.mapbox_sixteen_dp` appears to be unused"
errorLine1=" &lt;dimen name=&quot;mapbox_sixteen_dp&quot;>16dp&lt;/dimen>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/dimens.xml"
line="15"
column="12"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.drawable.mapbox_infowindow_icon_bg` appears to be unused">
<location
file="src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.color.mapbox_material_bg_selector` appears to be unused"
errorLine1="&lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2="^">
<location
file="src/main/res/color/mapbox_material_bg_selector.xml"
line="2"
column="1"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.string.mapbox_style_outdoors` appears to be unused"
errorLine1=" &lt;string name=&quot;mapbox_style_outdoors&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/outdoors-v10&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="22"
column="13"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.string.mapbox_style_traffic_day` appears to be unused"
errorLine1=" &lt;string name=&quot;mapbox_style_traffic_day&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/traffic-day-v2&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="27"
column="13"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.string.mapbox_style_traffic_night` appears to be unused"
errorLine1=" &lt;string name=&quot;mapbox_style_traffic_night&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/traffic-night-v2&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="28"
column="13"/>
</issue>
<issue
id="UnusedIds"
message="The resource `R.id.infowindow_subdescription` appears to be unused"
errorLine1=" android:id=&quot;@+id/infowindow_subdescription&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/mapbox_infowindow_content.xml"
line="43"
column="9"/>
</issue>
<issue
id="TypographyQuotes"
message="Replace straight quotes (&apos;&apos;) with directional quotes (‘’, &amp;#8216; and &amp;#8217;) ?"
@@ -554,76 +41,4 @@
column="55"/>
</issue>
<issue
id="IconDensities"
message="Missing the following drawables in `drawable-hdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
<location
file="src/main/res/drawable-hdpi"/>
</issue>
<issue
id="IconDensities"
message="Missing the following drawables in `drawable-mdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
<location
file="src/main/res/drawable-mdpi"/>
</issue>
<issue
id="IconDensities"
message="Missing the following drawables in `drawable-xhdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
<location
file="src/main/res/drawable-xhdpi"/>
</issue>
<issue
id="IconDensities"
message="Missing the following drawables in `drawable-xxhdpi`: mapbox_infowindow_icon_bg.9.png (found in drawable-xxxhdpi)">
<location
file="src/main/res/drawable-xxhdpi"/>
</issue>
<issue
id="SelectableText"
message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
errorLine1="&lt;TextView"
errorLine2="^">
<location
file="src/main/res/layout/mapbox_attribution_list_item.xml"
line="2"
column="1"/>
</issue>
<issue
id="SelectableText"
message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
errorLine1=" &lt;TextView"
errorLine2=" ^">
<location
file="src/main/res/layout/mapbox_infowindow_content.xml"
line="21"
column="5"/>
</issue>
<issue
id="SelectableText"
message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
errorLine1=" &lt;TextView"
errorLine2=" ^">
<location
file="src/main/res/layout/mapbox_infowindow_content.xml"
line="31"
column="5"/>
</issue>
<issue
id="ContentDescription"
message="[Accessibility] Missing `contentDescription` attribute on image"
errorLine1="&lt;ImageView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
errorLine2="^">
<location
file="src/main/res/layout/mapbox_view_image_marker.xml"
line="2"
column="1"/>
</issue>
</issues>

View File

@@ -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 @@ import com.mapbox.services.android.telemetry.location.LocationEnginePriority;
@UiThread
public final class Mapbox {
@SuppressLint("StaticFieldLeak")
private static Mapbox INSTANCE;
private Context context;
private String accessToken;

View File

@@ -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;

View File

@@ -109,13 +109,11 @@ class HTTPRequest implements Callback {
@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 @@ class HTTPRequest implements Callback {
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();

View File

@@ -272,7 +272,6 @@ public final class MapboxMap {
* Check whether tile pre-fetching is enabled or not.
*
* @return true if enabled
*
* @see MapboxMap#setPrefetchesTiles(boolean)
*/
@UiThread
@@ -316,7 +315,7 @@ public final class MapboxMap {
// 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 final class MapboxMap {
// 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;
}
}

View File

@@ -17,7 +17,6 @@ import com.mapbox.mapboxsdk.annotations.Marker;
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 @@ final class NativeMapView {
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 @@ final class NativeMapView {
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);

View File

@@ -346,7 +346,7 @@ final class Transform implements MapView.OnMapChangedListener {
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 @@ final class Transform implements MapView.OnMapChangedListener {
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);

View File

@@ -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 @@ public class MyLocationView extends View {
locationSource = new WeakReference<>(locationEngine);
}
@SuppressLint("MissingPermission")
@Override
public void onConnected() {
MyLocationView locationView = userLocationView.get();

View File

@@ -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 @@ import timber.log.Timber;
* Not public api.
*/
public class ConnectivityReceiver extends BroadcastReceiver {
@SuppressLint("StaticFieldLeak")
private static ConnectivityReceiver INSTANCE;
/**
@@ -82,7 +84,7 @@ public class ConnectivityReceiver extends BroadcastReceiver {
@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) {

View File

@@ -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 class OfflineManager {
*/
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 class OfflineManager {
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();

View File

@@ -72,9 +72,9 @@ public class FileSource {
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 class FileSource {
// 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: ");
}
}

View File

@@ -279,7 +279,7 @@ public class Function<I, O> {
// 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;
}
}

View File

@@ -83,11 +83,13 @@
<!-- Exposed styles -->
<public name="mapbox_style_mapbox_streets" type="string" />
<public name="mapbox_style_emerald" type="string" />
<public name="mapbox_style_outdoors" 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_style_traffic_day" type="string" />
<public name="mapbox_style_traffic_night" type="string" />
<!-- Exposed strings -->
<public name="mapbox_compassContentDescription" type="string" />

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorPrimaryDark" android:state_pressed="true" />
<item android:color="?attr/colorPrimary" />
</selector>

View File

@@ -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"/>

View File

@@ -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"/>
<TextView
android:id="@+id/infowindow_subdescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxEms="17"

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"/>

View File

@@ -3,5 +3,4 @@
<color name="mapbox_gray">#7D7F80</color>
<color name="mapbox_gray_light">#EEEEEE</color>
<color name="mapbox_blue">#1E8CAB</color>
<color name="mapbox_my_location_ring">@color/mapbox_blue</color>
</resources>

View File

@@ -2,17 +2,8 @@
<resources>
<dimen name="mapbox_infowindow_tipview_width">8dp</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_attribution_icon_left_padding">@dimen/mapbox_two_dp</dimen>
<dimen name="mapbox_attribution_icon_top_padding">@dimen/mapbox_two_dp</dimen>
<dimen name="mapbox_attribution_icon_right_padding">@dimen/mapbox_two_dp</dimen>
<dimen name="mapbox_attribution_icon_bottom_padding">@dimen/mapbox_two_dp</dimen>
<dimen name="mapbox_two_dp">2dp</dimen>
<dimen name="mapbox_four_dp">4dp</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_ninety_two_dp">92dp</dimen>
<dimen name="mapbox_my_locationview_outer_circle">18dp</dimen>
</resources>

View File

@@ -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 {

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="4" by="lint 2.3.1">
<issue
id="UnusedResources"
message="The resource `R.string.mapbox_access_token` appears to be unused"
errorLine1=" &lt;string name=&quot;mapbox_access_token&quot;>YOUR_MAPBOX_ACCESS_TOKEN_GOES_HERE&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/developer-config.xml"
line="3"
column="13"/>
</issue>
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `#cccc` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;#cccc&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/drawer_navigation_drawer.xml"
line="4"
column="5"/>
</issue>
<issue
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`)"
errorLine1=" android:background=&quot;?android:attr/selectableItemBackground&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/item_main_feature.xml"
line="6"
column="5"/>
</issue>
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `@color/mapboxGreen` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;@color/mapboxGreen&quot;>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/view_text_marker.xml"
line="5"
column="5"/>
</issue>
<issue
id="TypographyQuotes"
message="Replace straight quotes (&apos;&apos;) with directional quotes (‘’, &amp;#8216; and &amp;#8217;) ?"
errorLine1=" &lt;string name=&quot;mapbox_attributionTelemetryMessage&quot;>Estàs ajudant a millorar els mapes d\&apos;OpenStreetMap i de Mapbox aportant dades d\&apos;ús anònimes.&lt;/string>"
errorLine2=" ^">
<location
file="src/main/res/values-ca/strings.xml"
line="9"
column="55"/>
</issue>
<issue
id="IconDuplicatesConfig"
message="The `icon_burned.png` icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi">
<location
file="src/main/res/drawable-xhdpi/icon_burned.png"/>
<location
file="src/main/res/drawable-hdpi/icon_burned.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-hdpi/ic_launcher_round.png`: expected 72x72, but was 216x216">
<location
file="src/main/res/drawable-hdpi/ic_launcher_round.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-mdpi/ic_launcher_round.png`: expected 48x48, but was 144x144">
<location
file="src/main/res/drawable-mdpi/ic_launcher_round.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xhdpi/ic_launcher_round.png`: expected 96x96, but was 288x288">
<location
file="src/main/res/drawable-xhdpi/ic_launcher_round.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xxhdpi/ic_launcher_round.png`: expected 144x144, but was 432x432">
<location
file="src/main/res/drawable-xxhdpi/ic_launcher_round.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xxxhdpi/ic_launcher_round.png`: expected 192x192, but was 576x576">
<location
file="src/main/res/drawable-xxxhdpi/ic_launcher_round.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-hdpi/icon.png`: expected 72x72, but was 215x212">
<location
file="src/main/res/drawable-hdpi/icon.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-mdpi/icon.png`: expected 48x48, but was 143x141">
<location
file="src/main/res/drawable-mdpi/icon.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xhdpi/icon.png`: expected 96x96, but was 286x282">
<location
file="src/main/res/drawable-xhdpi/icon.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xxhdpi/icon.png`: expected 144x144, but was 429x423">
<location
file="src/main/res/drawable-xxhdpi/icon.png"/>
</issue>
<issue
id="IconExpectedSize"
message="Incorrect icon size for `drawable-xxxhdpi/icon.png`: expected 192x192, but was 572x564">
<location
file="src/main/res/drawable-xxxhdpi/icon.png"/>
</issue>
<issue
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)">
<location
file="src/main/res/drawable-hdpi"/>
</issue>
<issue
id="IconDensities"
message="Missing the following drawables in `drawable-mdpi`: ic_car_top.png, ic_taxi_top.png, ic_us.png">
<location
file="src/main/res/drawable-mdpi"/>
</issue>
<issue
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)">
<location
file="src/main/res/drawable-xhdpi"/>
</issue>
<issue
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)">
<location
file="src/main/res/drawable-xxhdpi"/>
</issue>
</issues>

View File

@@ -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 class MyLocationViewTest extends BaseActivityTest {
return getClass().getSimpleName();
}
@SuppressLint("MissingPermission")
@Override
public void perform(UiController uiController, View view) {
if (isEnabled) {

View File

@@ -43,10 +43,10 @@ public class OnMapReadyIdlingResource implements IdlingResource {
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;
}
}

View File

@@ -3,7 +3,6 @@ package com.mapbox.mapboxsdk.testapp;
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 @@ import static timber.log.Timber.DebugTree;
*/
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 class MapboxApplication extends Application {
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);

View File

@@ -92,7 +92,7 @@ public class FeatureOverviewActivity extends AppCompatActivity implements Permis
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");
}
}

View File

@@ -115,14 +115,14 @@ public class AddRemoveMarkerActivity extends AppCompatActivity {
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 @@ public class AddRemoveMarkerActivity extends AppCompatActivity {
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

View File

@@ -274,7 +274,7 @@ public class BulkMarkerActivity extends AppCompatActivity implements AdapterView
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;
}
}

View File

@@ -36,6 +36,7 @@ import com.mapbox.mapboxsdk.testapp.model.annotations.CountryMarkerViewOptions;
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 class MarkerViewActivity extends AppCompatActivity {
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())
);
}
}
}

View File

@@ -53,7 +53,7 @@ public class MarkerViewsInRectangleActivity extends AppCompatActivity implements
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<MarkerView> markers = mapboxMap.getMarkerViewsInRect(box);
// Show count

View File

@@ -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 class CameraPositionActivity extends AppCompatActivity implements OnMapRe
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();

View File

@@ -48,7 +48,7 @@ public class QueryRenderedFeaturesBoxCountActivity extends AppCompatActivity {
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<Feature> features = mapboxMap.queryRenderedFeatures(box);
// Show count
@@ -66,22 +66,21 @@ public class QueryRenderedFeaturesBoxCountActivity extends AppCompatActivity {
}
private void debugOutput(List<Feature> 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() : "<null>",
feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "<null>")
feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "<null>"
);
if (feature.getProperties() != null) {
for (Map.Entry<String, JsonElement> 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");
}
}
}

View File

@@ -53,7 +53,7 @@ public class QueryRenderedFeaturesBoxHighlightActivity extends AppCompatActivity
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<Feature> features = mapboxMap.queryRenderedFeatures(box, Filter.lt("height", 10), "building");
// Show count

View File

@@ -59,7 +59,7 @@ public class QueryRenderedFeaturesBoxSymbolCountActivity extends AppCompatActivi
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 class QueryRenderedFeaturesBoxSymbolCountActivity extends AppCompatActivi
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<Feature> features = mapboxMap.queryRenderedFeatures(box, "symbols-layer");
// Show count

View File

@@ -59,9 +59,9 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
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<Feature> features = mapboxMap.queryRenderedFeatures(pixel);
@@ -84,22 +84,21 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
}
private void debugOutput(List<Feature> 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() : "<null>",
feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "<null>")
feature.getGeometry() != null ? feature.getGeometry().getClass().getSimpleName() : "<null>"
);
if (feature.getProperties() != null) {
for (Map.Entry<String, JsonElement> 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 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
private final List<Feature> features;
public CustomMarker(BaseMarkerOptions baseMarkerOptions, List<Feature> features) {
CustomMarker(BaseMarkerOptions baseMarkerOptions, List<Feature> features) {
super(baseMarkerOptions);
this.features = features;
}
@@ -201,7 +200,7 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
return this;
}
public CustomMarkerOptions() {
CustomMarkerOptions() {
}
private CustomMarkerOptions(Parcel in) {

View File

@@ -15,6 +15,8 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
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 class SnapshotActivity extends AppCompatActivity implements OnMapReadyCal
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();
}
});

View File

@@ -21,6 +21,8 @@ import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
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 class DynamicInfoWindowAdapterActivity extends AppCompatActivity implemen
// 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 class DynamicInfoWindowAdapterActivity extends AppCompatActivity implemen
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;
}
});

View File

@@ -69,7 +69,7 @@ public class DebugModeActivity extends AppCompatActivity {
@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();
}
}

View File

@@ -12,7 +12,6 @@ import android.widget.Toast;
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 @@ public class OfflineActivity extends AppCompatActivity
// 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 class OfflineActivity extends AppCompatActivity
@Override
public void onError(String error) {
Timber.e("Error: " + error);
Timber.e("Error: %s" , error);
}
});
}
@@ -223,7 +221,7 @@ public class OfflineActivity extends AppCompatActivity
}
// Start progress bar
Timber.d("Download started: " + regionName);
Timber.d("Download started: %s", regionName);
startProgress();
// Definition
@@ -241,14 +239,14 @@ public class OfflineActivity extends AppCompatActivity
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);
}
});
}

View File

@@ -74,7 +74,7 @@ public class CircleLayerActivity extends AppCompatActivity implements View.OnCli
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 @@ public class CircleLayerActivity extends AppCompatActivity implements View.OnCli
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... ");
}
}

View File

@@ -128,7 +128,7 @@ public class GeoJsonClusteringActivity extends AppCompatActivity {
)
);
} catch (MalformedURLException malformedUrlException) {
Timber.e("That's not an url... " + malformedUrlException.getMessage());
Timber.e(malformedUrlException,"That's not an url... ");
}
// Add unclustered layer

View File

@@ -55,7 +55,7 @@ public class RealTimeGeoJsonActivity extends AppCompatActivity implements OnMapR
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

View File

@@ -317,12 +317,12 @@ public class RuntimeStyleActivity extends AppCompatActivity {
layer = mapboxMap.getLayerAs("parksLayer");
// And get some properties
PropertyValue<Boolean> 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<String> fillTranslateAnchor = layer.getFillTranslateAnchor();
Timber.d("Fill translate anchor: " + fillTranslateAnchor.getValue());
Timber.d("Fill translate anchor: %s", fillTranslateAnchor.getValue());
PropertyValue<String> 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 @@ public class RuntimeStyleActivity extends AppCompatActivity {
Function<Float, String> function = (Function<Float, String>) fillColor.getFunction();
if (function != null) {
ExponentialStops<Float, String> 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<Float, String> stop : stops) {
Timber.d("Fill color #stops: " + stop);
Timber.d("Fill color #stops: %s", stop);
}
}
}

View File

@@ -72,7 +72,7 @@ public class StyleFileActivity extends AppCompatActivity {
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();

View File

@@ -50,7 +50,7 @@ public class MyLocationDrawableActivity extends BaseLocationActivity implements
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);

View File

@@ -32,7 +32,7 @@ public class OfflineListRegionsDialog extends DialogFragment {
.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() {

View File

@@ -29,7 +29,7 @@ public class OfflineUtils {
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;
}

View File

@@ -146,15 +146,15 @@ public class TimingLogger {
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));
}
}

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,5v14H5V5h14m0,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>

View File

@@ -1,4 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<size android:width="10px" android:height="10px"/>
<solid android:color="@color/redAccent"/>
</shape>

View File

@@ -14,16 +14,4 @@
app:mapbox_cameraZoom="3"
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabStartStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:src="@android:drawable/ic_media_play"
app:backgroundTint="@color/primary"/>
</RelativeLayout>

View File

@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
@@ -20,8 +18,8 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginBottom="82dp"
android:layout_marginRight="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:src="@drawable/ic_my_location"
app:backgroundTint="@color/accent"
app:layout_anchorGravity="top"/>
@@ -35,4 +33,4 @@
android:src="@drawable/ic_paint"
app:backgroundTint="@color/primary"/>
</FrameLayout>
</merge>

View File

@@ -15,7 +15,9 @@
app:mapbox_cameraZoom="15"/>
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:background="@color/primary"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
@@ -23,6 +25,7 @@
<Button
android:id="@+id/cameraMoveButton"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -30,6 +33,7 @@
<Button
android:id="@+id/cameraEaseButton"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -37,6 +41,7 @@
<Button
android:id="@+id/cameraAnimateButton"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"

View File

@@ -23,6 +23,7 @@
android:layout_alignParentRight="true"
android:layout_marginBottom="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin"
android:src="@drawable/ic_directions_bus_black"
app:backgroundTint="@android:color/white"/>
@@ -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"/>
</RelativeLayout>

View File

@@ -21,6 +21,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:layout_margin="8dp"
android:textIsSelectable="true"
android:textSize="14sp"/>
<android.support.design.widget.FloatingActionButton
@@ -29,6 +30,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginBottom="82dp"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:src="@drawable/ic_refresh"
app:backgroundTint="@color/accent"

View File

@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/button_open_dialog"
@@ -11,4 +8,4 @@
android:layout_gravity="center"
android:text="@string/button_open_dialog"/>
</FrameLayout>
</merge>

View File

@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"/>
<View
android:layout_width="@dimen/map_padding_left"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/mapbox_blue" />
android:background="@color/mapbox_blue"/>
<View
android:layout_width="match_parent"
@@ -24,13 +21,13 @@
android:layout_marginRight="@dimen/map_padding_right"
android:layout_marginStart="@dimen/map_padding_left"
android:alpha="0.5"
android:background="@color/mapbox_blue" />
android:background="@color/mapbox_blue"/>
<View
android:layout_width="@dimen/map_padding_right"
android:layout_height="match_parent"
android:layout_gravity="end"
android:alpha="0.5"
android:background="@color/mapbox_blue" />
android:background="@color/mapbox_blue"/>
</FrameLayout>
</merge>

View File

@@ -17,6 +17,7 @@
<TextView
android:id="@+id/countView"
android:textIsSelectable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"

View File

@@ -10,16 +10,18 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
android:textIsSelectable="true"
app:mapbox_cameraTargetLat="38.907192"
app:mapbox_cameraTargetLng="-77.036871"
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
app:mapbox_cameraZoom="12" />
app:mapbox_cameraZoom="12"
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
<TextView
android:id="@+id/countView"
android:textIsSelectable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:textSize="20sp" />
android:textSize="20sp"/>
</RelativeLayout>

View File

@@ -15,7 +15,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="No Results"
android:text="@string/no_results"
android:textSize="24sp"/>
</LinearLayout>

View File

@@ -2,13 +2,13 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/tools"
android:id="@+id/map_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
mapbox:ignore="NestedWeights">
<LinearLayout
android:id="@+id/map_container1"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
@@ -40,7 +40,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/map_container2"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"

View File

@@ -1,22 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout
<android.support.v4.widget.ContentLoadingProgressBar
android:id="@id/progress"
android:layout_width="match_parent"
android:layout_height="match_parent">
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<android.support.v4.widget.ContentLoadingProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</FrameLayout>
</LinearLayout>
</merge>

View File

@@ -18,27 +18,30 @@
android:layout_height="match_parent"
android:layout_below="@+id/progress_bar"/>
<Button
android:id="@+id/button_download_region"
android:layout_width="wrap_content"
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="@dimen/fab_margin"
android:background="@color/white"
android:padding="10dp"
android:text="@string/button_download_region"/>
android:background="@color/primary"
android:orientation="horizontal"
android:weightSum="2">
<Button
android:id="@+id/button_list_regions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_download_region"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/fab_margin"
android:background="@color/white"
android:padding="10dp"
android:text="@string/button_list_regions"/>
<Button
android:id="@+id/button_download_region"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_download_region"/>
<Button
android:id="@+id/button_list_regions"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_list_regions"/>
</LinearLayout>
</RelativeLayout>

View File

@@ -15,7 +15,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="No Results"
android:text="@string/no_results"
android:textSize="24sp"/>
</LinearLayout>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
@@ -22,7 +23,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:paddingBottom="8dp"
android:text="Move the map by x/y pixels"
android:text="@string/action_scroll_by"
android:textColor="#FFFFFF"
android:textSize="20sp" />
@@ -32,7 +33,8 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/seekbar_move_x"
android:layout_below="@id/title"
android:text="X: 0000" />
android:text="X: 0000"
tools:ignore="HardcodedText"/>
<SeekBar
android:id="@id/seekbar_move_x"
@@ -40,6 +42,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginLeft="56dp"
android:layout_marginStart="56dp"
android:max="50"
android:progress="0" />
@@ -48,7 +51,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/seekbar_move_y"
android:text="Y: 0000" />
android:text="Y: 0000"
tools:ignore="HardcodedText"/>
<SeekBar
android:id="@id/seekbar_move_y"
@@ -58,6 +62,7 @@
android:layout_marginBottom="8dp"
android:layout_marginLeft="56dp"
android:layout_marginTop="16dp"
android:layout_marginStart="56dp"
android:max="50"
android:progress="0" />
@@ -66,7 +71,6 @@
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar">

View File

@@ -16,6 +16,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:contentDescription="@null"
android:background="@color/primary"/>
<com.mapbox.mapboxsdk.maps.MapView

View File

@@ -10,7 +10,6 @@
android:layout_height="match_parent">
<android.support.v4.view.PagerTabStrip
android:id="@+id/viewpager_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"

View File

@@ -16,7 +16,7 @@
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:gravity="center"
android:text="Latitude"
android:text="@string/latitude"
android:textColor="@android:color/white" />
<SeekBar
@@ -25,7 +25,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toStartOf="@+id/value_lat"
android:layout_toLeftOf="@+id/value_lat"
android:layout_toEndOf="@+id/text_lat"
android:layout_toRightOf="@id/text_lat"
android:max="360" />
@@ -38,7 +40,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:gravity="center"
android:text="-180"
android:text="@string/min_value"
android:textColor="@android:color/white" />
</RelativeLayout>
@@ -56,7 +58,7 @@
android:textColor="@android:color/white"
android:layout_marginRight="4dp"
android:gravity="center"
android:text="Longitude" />
android:text="@string/longitude" />
<SeekBar
android:id="@+id/seekbar_lon"
@@ -64,8 +66,10 @@
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toStartOf="@+id/value_lon"
android:layout_toLeftOf="@+id/value_lon"
android:layout_toRightOf="@id/text_lon"
android:layout_toEndOf="@id/text_lon"
android:max="360" />
<TextView
@@ -78,7 +82,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:gravity="center"
android:text="-180" />
android:text="@string/min_value" />
</RelativeLayout>
@@ -95,7 +99,7 @@
android:textColor="@android:color/white"
android:layout_marginRight="4dp"
android:gravity="center"
android:text="Zoom" />
android:text="@string/zoom" />
<SeekBar
android:id="@+id/seekbar_zoom"
@@ -103,8 +107,10 @@
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toStartOf="@+id/value_zoom"
android:layout_toLeftOf="@+id/value_zoom"
android:layout_toRightOf="@id/text_zoom"
android:layout_toEndOf="@+id/text_zoom"
android:max="18" />
<TextView
@@ -117,7 +123,7 @@
android:textColor="@android:color/white"
android:layout_marginStart="4dp"
android:gravity="center"
android:text="18" />
android:text="@string/default_zoom_value" />
</RelativeLayout>
@@ -134,7 +140,7 @@
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:gravity="center"
android:text="Bearing" />
android:text="@string/bearing" />
<SeekBar
android:id="@+id/seekbar_bearing"
@@ -142,8 +148,10 @@
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toStartOf="@+id/value_bearing"
android:layout_toLeftOf="@+id/value_bearing"
android:layout_toRightOf="@id/text_bearing"
android:layout_toEndOf="@id/text_bearing"
android:max="360" />
<TextView
@@ -156,7 +164,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:gravity="center"
android:text="0" />
android:text="@string/default_tilt_value" />
</RelativeLayout>
@@ -173,7 +181,7 @@
android:textColor="@android:color/white"
android:layout_marginRight="4dp"
android:gravity="center"
android:text="Tilt" />
android:text="@string/tilt" />
<SeekBar
android:id="@+id/seekbar_tilt"
@@ -181,8 +189,10 @@
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toStartOf="@+id/value_tilt"
android:layout_toLeftOf="@+id/value_tilt"
android:layout_toRightOf="@id/text_tilt"
android:layout_toEndOf="@id/text_tilt"
android:max="60" />
<TextView
@@ -195,7 +205,7 @@
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:gravity="center"
android:text="0" />
android:text="@string/default_tilt_value" />
</RelativeLayout>

View File

@@ -9,7 +9,6 @@
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/map_card"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginLeft="5dp"

View File

@@ -20,6 +20,7 @@
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="@android:color/black"
android:textIsSelectable="false"
android:textSize="16sp"/>
<TextView
@@ -31,6 +32,7 @@
android:alpha="0.56"
android:maxLines="1"
android:textColor="@android:color/black"
android:textIsSelectable="false"
android:textSize="14sp"/>
</LinearLayout>

View File

@@ -18,6 +18,7 @@
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:textIsSelectable="true"
android:layout_marginTop="16dp"
android:alpha="0.54"
android:background="@android:color/transparent"

View File

@@ -6,6 +6,7 @@
<ImageView
android:id="@id/imageView"
android:layout_width="64dp"
android:contentDescription="@null"
android:layout_height="64dp"/>
<TextView
@@ -14,6 +15,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="2dp"
android:textIsSelectable="true"
android:textColor="@android:color/white"
android:textStyle="bold"/>

View File

@@ -11,6 +11,7 @@
android:layout_height="wrap_content"
android:textStyle="bold"
android:padding="4dp"
android:textIsSelectable="true"
android:layout_centerInParent="true" />
</RelativeLayout>

View File

@@ -3,10 +3,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_action_intensity"
android:title="Change intensity"
android:title="@string/change_intensity"
app:showAsAction="never"/>
<item
android:id="@+id/menu_action_anchor"
android:title="Change Anchor"
android:title="@string/change_anchor"
app:showAsAction="never"/>
</menu>

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/spinner"
android:title="Amount of markers"
android:title="@string/amount_of_markers"
app:actionViewClass="android.widget.Spinner"
app:showAsAction="always"/>
</menu>

View File

@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_update_layer"
android:title="Update layer (invalidate)" />
android:title="@string/update_layer_invalidate"/>
<item
android:id="@+id/action_set_color_red"
android:title="Red" />
android:title="@string/red"/>
<item
android:id="@+id/action_set_color_green"
android:title="Green" />
android:title="@string/green"/>
<item
android:id="@+id/action_set_color_blue"
android:title="Blue" />
android:title="@string/blue"/>
</menu>

View File

@@ -4,47 +4,47 @@
<item
android:id="@+id/action_add_exponential_zoom_function"
android:title="Add an exponential zoom function"
android:title="@string/add_an_exponential_zoom_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_interval_zoom_function"
android:title="Add an interval zoom function"
android:title="@string/add_an_interval_zoom_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_categorical_source_function"
android:title="Add a categorical source function"
android:title="@string/add_a_categorical_source_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_exponential_source_function"
android:title="Add an exponential source function"
android:title="@string/add_an_exponential_source_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_identity_source_function"
android:title="Add an identity source function"
android:title="@string/add_an_identity_source_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_interval_source_function"
android:title="Add an interval source function"
android:title="@string/add_an_interval_source_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_composite_exponential_function"
android:title="Add a composite, exponential function"
android:title="@string/add_a_composite_exponential_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_composite_categorical_function"
android:title="Add a composite, categorical function"
android:title="@string/add_a_composite_categorical_function"
mapbox:showAsAction="never"/>
<item
android:id="@+id/action_add_composite_interval_function"
android:title="Add a composite, interval function"
android:title="@string/add_a_composite_interval_function"
mapbox:showAsAction="never"/>
</menu>

View File

@@ -3,10 +3,10 @@
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_user_tracking"
android:title="My Location Tracking"
android:title="@string/my_location_tracking"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_bangalore"
android:title="Bangalore"
android:title="@string/bangalore"
mapbox:showAsAction="never" />
</menu>

View File

@@ -4,6 +4,5 @@
<item
android:id="@+id/menuItemReset"
android:title="@string/menuitem_title_reset"
app:showAsAction="always"
/>
app:showAsAction="always"/>
</menu>

View File

@@ -4,66 +4,66 @@
<item
android:id="@+id/action_list_layers"
android:title="List all layers in the style"
android:title="@string/list_all_layers_in_the_style"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_list_sources"
android:title="List all sources in the style"
android:title="@string/list_all_sources_in_the_style"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_water_color"
android:title="Color the water"
android:title="@string/color_the_water"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_background_opacity"
android:title="Set background opacity"
android:title="@string/set_background_opacity"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_road_avoid_edges"
android:title="Set road symbol placement to Point"
android:title="@string/set_road_symbol_placement_to_point"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_layer_visibility"
android:title="Set layer visibility to false"
android:title="@string/set_layer_visibility_to_false"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_add_parks_layer"
android:title="Add a parks layer"
android:title="@string/add_a_parks_layer"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_add_dynamic_parks_layer"
android:title="Add a dynamic GeoJSON source"
android:title="@string/add_a_dynamic_geojson_source"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_remove_layer"
android:title="Remove buildings layer"
android:title="@string/remove_buildings_layer"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_add_terrain_layer"
android:title="Add a terrain layer"
android:title="@string/add_a_terrain_layer"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_add_satellite_layer"
android:title="Add a satellite layer"
android:title="@string/add_a_satellite_layer"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_update_water_color_on_zoom"
android:title="Change the water color on zoom"
android:title="@string/change_the_water_color_on_zoom"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_add_custom_tiles"
android:title="Custom tiles"
android:title="@string/custom_tiles"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_fill_filter"
android:title="Apply filtered fill"
android:title="@string/apply_filtered_fill"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_line_filter"
android:title="Apply filtered line"
android:title="@string/apply_filtered_line"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_numeric_filter"
android:title="Apply numeric fill filter"
android:title="@string/apply_numeric_fill_filter"
mapbox:showAsAction="never" />
</menu>

View File

@@ -3,14 +3,14 @@
<item
android:id="@+id/action_toggle_text_size"
android:title="Toggle text size"/>
android:title="@string/toggle_text_size"/>
<item
android:id="@+id/action_toggle_text_field"
android:title="Toggle text field contents"/>
android:title="@string/toggle_text_field_contents"/>
<item
android:id="@+id/action_toggle_text_font"
android:title="Toggle text font"/>
android:title="@string/toggle_text_font"/>
</menu>

View File

@@ -3,23 +3,23 @@
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_zoom_in"
android:title="Zoom in"
android:title="@string/zoom_in"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_zoom_out"
android:title="Zoom out"
android:title="@string/zoom_out"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_zoom_by"
android:title="Zoom by 2"
android:title="@string/zoom_by_2"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_zoom_to_point"
android:title="Zoom to point"
android:title="@string/zoom_to_point"
mapbox:showAsAction="never" />
<item
android:id="@+id/action_zoom_to"
android:title="Zoom to 4"
android:title="@string/zoom_to_4"
mapbox:showAsAction="never" />
</menu>

View File

@@ -3,7 +3,6 @@
<dimen name="circle_size">24dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="attr_margin">10dp</dimen>
<dimen name="coordinatebounds_margin">32dp</dimen>
<dimen name="map_padding_left">96dp</dimen>
<dimen name="map_padding_bottom">256dp</dimen>
<dimen name="map_padding_right">32dp</dimen>

View File

@@ -150,6 +150,8 @@
<string name="action_color_polygon">Change color</string>
<string name="action_holes_polygon">Change holes</string>
<string name="action_width_polyline">Change width</string>
<string name="action_calculate_distance">"Click the map to calculate the distance"</string>
<string name="action_scroll_by">Move the map by x/y pixels</string>
<!--Menu-->
<string name="menuitem_title_concurrent_infowindow">Concurrent Open InfoWindows</string>
@@ -185,5 +187,57 @@
<string name="dynamic_marker_chelsea_snippet">Stamford Bridge</string>
<string name="dynamic_marker_arsenal_title">Arsenal</string>
<string name="dynamic_marker_arsenal_snippet">Emirates Stadium</string>
<string name="debug_zoom">Zoom: %s</string>
<string name="debug_zoom">Zoom: %d</string>
<string name="viewcache_size">"ViewCache size %d"</string>
<string name="latitude">Latitude</string>
<string name="min_value">-180</string>
<string name="longitude">Longitude</string>
<string name="zoom">Zoom</string>
<string name="default_zoom_value">18</string>
<string name="bearing">Bearing</string>
<string name="default_tilt_value">0</string>
<string name="tilt">Tilt</string>
<string name="no_results">No Results</string>
<string name="change_intensity">Change intensity</string>
<string name="change_anchor">Change Anchor</string>
<string name="amount_of_markers">Amount of markers</string>
<string name="update_layer_invalidate">Update layer (invalidate)</string>
<string name="red">Red</string>
<string name="green">Green</string>
<string name="blue">Blue</string>
<string name="add_an_exponential_zoom_function">Add an exponential zoom function</string>
<string name="add_an_interval_zoom_function">Add an interval zoom function</string>
<string name="add_a_categorical_source_function">Add a categorical source function</string>
<string name="add_an_exponential_source_function">Add an exponential source function</string>
<string name="add_an_identity_source_function">Add an identity source function</string>
<string name="add_an_interval_source_function">Add an interval source function</string>
<string name="add_a_composite_categorical_function">Add a composite, categorical function</string>
<string name="add_a_composite_exponential_function">Add a composite, exponential function</string>
<string name="add_a_composite_interval_function">Add a composite, interval function</string>
<string name="my_location_tracking">My Location Tracking</string>
<string name="bangalore">Bangalore</string>
<string name="list_all_layers_in_the_style">List all layers in the style</string>
<string name="list_all_sources_in_the_style">List all sources in the style</string>
<string name="color_the_water">Color the water</string>
<string name="set_background_opacity">Set background opacity</string>
<string name="set_road_symbol_placement_to_point">Set road symbol placement to Point</string>
<string name="set_layer_visibility_to_false">Set layer visibility to false</string>
<string name="add_a_parks_layer">Add a parks layer</string>
<string name="add_a_dynamic_geojson_source">Add a dynamic GeoJSON source</string>
<string name="remove_buildings_layer">Remove buildings layer</string>
<string name="add_a_terrain_layer">Add a terrain layer</string>
<string name="add_a_satellite_layer">Add a satellite layer</string>
<string name="change_the_water_color_on_zoom">Change the water color on zoom</string>
<string name="custom_tiles">Custom tiles</string>
<string name="apply_filtered_fill">Apply filtered fill</string>
<string name="apply_filtered_line">Apply filtered line</string>
<string name="apply_numeric_fill_filter">Apply numeric fill filter</string>
<string name="toggle_text_size">Toggle text size</string>
<string name="toggle_text_field_contents">Toggle text field contents</string>
<string name="toggle_text_font">Toggle text font</string>
<string name="zoom_in">Zoom in</string>
<string name="zoom_out">Zoom out</string>
<string name="zoom_by_2">Zoom by 2</string>
<string name="zoom_to_point">Zoom to point</string>
<string name="zoom_to_4">Zoom to 4</string>
</resources>