From 44875d1f035a85892fe6437560ffc1c0d421349f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 3 Nov 2014 02:12:34 +0100 Subject: [PATCH] Fix avoid roads --- OsmAnd/res/layout/list_bigtextview.xml | 22 ++++++++++++------- .../plus/helpers/AvoidSpecificRoads.java | 5 ++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/OsmAnd/res/layout/list_bigtextview.xml b/OsmAnd/res/layout/list_bigtextview.xml index bccefe39b4..48036fd882 100644 --- a/OsmAnd/res/layout/list_bigtextview.xml +++ b/OsmAnd/res/layout/list_bigtextview.xml @@ -1,11 +1,17 @@ - + android:layout_height="wrap_content" > - \ No newline at end of file + + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index 9f341268b3..317950a4f0 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -21,7 +21,6 @@ import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.DialogInterface; import android.os.AsyncTask; -import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; @@ -58,9 +57,9 @@ public class AvoidSpecificRoads { // User super class to create the View View v = convertView; if (position == 0) { - TextView tv = (TextView) ctx.getLayoutInflater().inflate(R.layout.list_bigtextview, null); + v= ctx.getLayoutInflater().inflate(R.layout.list_bigtextview, null); + TextView tv = (TextView) v.findViewById(R.id.Text); tv.setText(app.getString(R.string.select_impassable_road)); - v = tv; } else { if (v == null || v.findViewById(R.id.info_close) == null) { v = ctx.getLayoutInflater().inflate(R.layout.waypoint_reached, null);