From ef040cb293a55ed90e147871dc5fd629846b8507 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 17 Nov 2015 15:20:00 +0200 Subject: [PATCH] Formatting --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 1 + OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 96d5094a29..6fdf2af98f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -355,6 +355,7 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents { public Object getLastNonConfigurationInstanceByKey(String key) { Object k = super.getLastNonConfigurationInstance(); if (k instanceof Map) { + return ((Map) k).get(key); } return null; diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 8fa98d70e0..b90bccf9cf 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -19,8 +19,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.TextView; + import net.londatiga.android.ActionItem; import net.londatiga.android.QuickAction; +import net.osmand.PlatformUtil; import net.osmand.core.android.MapRendererContext; import net.osmand.data.LatLon; import net.osmand.data.RotatedTileBox; @@ -38,11 +40,16 @@ import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.views.controls.MapRouteInfoControl; import net.osmand.plus.views.controls.MapRoutePreferencesControl; import net.osmand.plus.views.corenative.NativeCoreContext; + +import org.apache.commons.logging.Log; + import java.util.ArrayList; import java.util.List; + import gnu.trove.list.array.TIntArrayList; public class MapControlsLayer extends OsmandMapLayer { + private static final Log LOG = PlatformUtil.getLog(MapControlsLayer.class); private static final int TIMEOUT_TO_SHOW_BUTTONS = 7000; public static final int REQUEST_ADDRESS_SELECT = 2; @@ -865,7 +872,7 @@ public class MapControlsLayer extends OsmandMapLayer { nightMode = night; if (bgDark != 0 && bgLight != 0) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { - iv.setBackgroundDrawable(ctx.getResources().getDrawable(night ? bgDark : bgLight, + iv.setBackground(ctx.getResources().getDrawable(night ? bgDark : bgLight, mapActivity.getTheme())); } else { iv.setBackgroundDrawable(ctx.getResources().getDrawable(night ? bgDark : bgLight));