From 7bc3a4e75e660b60d035cba515e980beb9173c70 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 8 Sep 2015 11:38:10 +0300 Subject: [PATCH] Side sliders no longer owerlap with checkboxes #1657 --- .../plus/activities/MapActivityLayers.java | 25 ++++----- .../osmand/plus/dialogs/ConfigureMapMenu.java | 36 ++++++------ .../net/osmand/plus/helpers/GpxUiHelper.java | 56 +++++++++---------- .../plus/helpers/WaypointDialogHelper.java | 35 ++++++------ 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index 160a3eb181..5115e14803 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -1,10 +1,11 @@ package net.osmand.plus.activities; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map.Entry; +import android.content.DialogInterface; +import android.content.Intent; +import android.support.v7.app.AlertDialog; +import android.widget.ListAdapter; +import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.ResultMatcher; @@ -12,7 +13,6 @@ import net.osmand.StateChangedListener; import net.osmand.access.AccessibleToast; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager.TileSourceTemplate; -import net.osmand.osm.PoiCategory; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.Item; import net.osmand.plus.GPXUtilities.GPXFile; @@ -47,12 +47,11 @@ import net.osmand.plus.views.RouteLayer; import net.osmand.plus.views.TransportInfoLayer; import net.osmand.plus.views.TransportStopsLayer; import net.osmand.plus.views.mapwidgets.MapWidgetRegistry; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.content.DialogInterface; -import android.content.Intent; -import android.widget.ListAdapter; -import android.widget.Toast; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map.Entry; /** * Object is responsible to maintain layers using by map activity @@ -259,7 +258,7 @@ public class MapActivityLayers { addFilterToList(adapter, list, f); } - Builder builder = new AlertDialog.Builder(activity); + AlertDialog.Builder builder = new AlertDialog.Builder(activity); ListAdapter listAdapter = adapter.createListAdapter(activity, app.getSettings().isLightContent()); builder.setAdapter(listAdapter, new DialogInterface.OnClickListener(){ @Override @@ -321,7 +320,7 @@ public class MapActivityLayers { final List> entriesMapList = new ArrayList>(entriesMap.entrySet()); - Builder builder = new AlertDialog.Builder(activity); + AlertDialog.Builder builder = new AlertDialog.Builder(activity); String selectedTileSourceKey = settings.MAP_TILE_SOURCES.get(); diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index f1598b2292..b4a5ede423 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -1,12 +1,16 @@ package net.osmand.plus.dialogs; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; +import android.content.Context; +import android.content.DialogInterface; +import android.content.DialogInterface.OnMultiChoiceClickListener; +import android.content.Intent; +import android.support.v7.app.AlertDialog; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.Toast; import net.osmand.access.AccessibleToast; +import net.osmand.core.android.MapRendererContext; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; import net.osmand.plus.ContextMenuAdapter.OnRowItemClick; @@ -20,7 +24,6 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.PluginActivity; import net.osmand.plus.activities.SettingsActivity; import net.osmand.plus.activities.TransportRouteHelper; -import net.osmand.plus.dashboard.DashboardOnMap.DashboardType; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.RendererRegistry; @@ -28,21 +31,18 @@ import net.osmand.plus.views.GPXLayer; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.RouteLayer; import net.osmand.plus.views.corenative.NativeCoreContext; -import gnu.trove.list.array.TIntArrayList; -import net.osmand.core.android.MapRendererContext; import net.osmand.render.RenderingRuleProperty; import net.osmand.render.RenderingRuleStorageProperties; import net.osmand.render.RenderingRulesStorage; import net.osmand.util.Algorithms; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.DialogInterface.OnMultiChoiceClickListener; -import android.view.View; -import android.widget.ArrayAdapter; -import android.widget.Toast; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import gnu.trove.list.array.TIntArrayList; public class ConfigureMapMenu { @@ -473,7 +473,7 @@ public class ConfigureMapMenu { protected void showPreferencesDialog(final ContextMenuAdapter adapter, final ArrayAdapter a, final int pos, final MapActivity activity, String category, List ps, final List> prefs) { - Builder bld = new AlertDialog.Builder(activity); + AlertDialog.Builder bld = new AlertDialog.Builder(activity); boolean[] checkedItems = new boolean[prefs.size()]; for (int i = 0; i < prefs.size(); i++) { checkedItems[i] = prefs.get(i).get(); diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 9eaf5f07d4..f00aab8541 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -1,12 +1,24 @@ package net.osmand.plus.helpers; -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import android.app.Activity; +import android.app.Application; +import android.app.ProgressDialog; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.os.Build; +import android.support.v7.app.AlertDialog; +import android.util.TypedValue; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.CompoundButton; +import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.ImageView; +import android.widget.TextView; +import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.IndexConstants; @@ -20,26 +32,14 @@ import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.util.Algorithms; -import android.app.Activity; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.app.Application; -import android.app.ProgressDialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.os.Build; -import android.util.TypedValue; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.ArrayAdapter; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.CompoundButton.OnCheckedChangeListener; -import android.widget.ImageView; -import android.widget.TextView; -import android.widget.Toast; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class GpxUiHelper { @@ -232,7 +232,7 @@ public class GpxUiHelper { final List list, final ContextMenuAdapter adapter) { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); - Builder b = new AlertDialog.Builder(activity); + AlertDialog.Builder b = new AlertDialog.Builder(activity); // final int padding = (int) (12 * activity.getResources().getDisplayMetrics().density + 0.5f); final boolean light = app.getSettings().isLightContent(); final int layout; diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index c60a08aa20..31ba752b17 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -1,7 +1,20 @@ package net.osmand.plus.helpers; -import java.util.ArrayList; -import java.util.List; +import android.app.Activity; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.content.DialogInterface.OnDismissListener; +import android.os.AsyncTask; +import android.support.v4.app.FragmentActivity; +import android.support.v7.app.AlertDialog; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.CompoundButton; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.TextView; import net.osmand.data.LatLon; import net.osmand.data.LocationPoint; @@ -16,21 +29,9 @@ import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.views.AnimateDraggingMapThread; import net.osmand.util.MapUtils; -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.content.DialogInterface.OnDismissListener; -import android.os.AsyncTask; -import android.support.v4.app.FragmentActivity; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.ArrayAdapter; -import android.widget.CompoundButton; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.TextView; + +import java.util.ArrayList; +import java.util.List; /** */