From 685b8b2c84e47d8126e924ff3fddc22a96237680 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Fri, 28 Jul 2017 19:36:13 +0200 Subject: Solve lint issues, reduce baseline (#9627) * [android] - fix lint issues SDK --- .../activity/infowindow/DynamicInfoWindowAdapterActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java') diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java index 18db2ba8a8..e8525b6a62 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java @@ -21,6 +21,8 @@ import com.mapbox.mapboxsdk.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; } }); -- cgit v1.2.1