Solve lint issues, reduce baseline (#9627)
* [android] - fix lint issues SDK
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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... ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:padding="4dp"
|
||||
android:textIsSelectable="true"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
<item
|
||||
android:id="@+id/menuItemReset"
|
||||
android:title="@string/menuitem_title_reset"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user