From dd74c918edd41a6362d7caac6d0d0839858bb83f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 16 Mar 2015 00:09:13 +0100 Subject: [PATCH] Fix lp --- .../osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java index cb53939bc2..9b5348af02 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java @@ -47,6 +47,7 @@ import android.graphics.Path; import android.graphics.drawable.Drawable; import android.text.format.DateFormat; import android.view.View; +import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; @@ -751,7 +752,7 @@ public class RouteInfoWidgetsFactory { int cacheRulerDistPix = (int) (pixDensity * roundedDist); cacheRulerText = OsmAndFormatter.getFormattedDistance((float) roundedDist, view.getApplication()); text.setText(cacheRulerText); - LinearLayout.LayoutParams lp = (LayoutParams) layout.getLayoutParams(); + ViewGroup.LayoutParams lp = layout.getLayoutParams(); lp.width = cacheRulerDistPix; layout.setLayoutParams(lp); layout.requestLayout();