From 86b14d79b8197d4b6f4d885e7f2b4a5b50849bc3 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 4 Feb 2015 21:23:44 +0100 Subject: [PATCH 1/2] Fix build --- OsmAnd/res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 9e12894a29..cb4f33e1b9 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,7 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + OsMo Edit group Parking place REMOVE THE TAG From 5af7c12d267bd7dda014ffc7d30cdef29205b009 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 4 Feb 2015 21:36:02 +0100 Subject: [PATCH 2/2] Add lint check --- .../src/net/osmand/plus/osmo/OsMoGroupsActivity.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 6a820e8c12..5eb002e93e 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -9,7 +9,6 @@ import android.support.v4.view.MenuItemCompat; import android.support.v7.view.ActionMode; import android.view.*; import gnu.trove.list.array.TIntArrayList; - import java.text.Collator; import java.util.ArrayList; import java.util.Collections; @@ -18,7 +17,6 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.access.AccessibleToast; @@ -42,6 +40,7 @@ import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoDevice; import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoGroup; import net.osmand.plus.osmo.OsMoService.SessionInfo; import net.osmand.util.MapUtils; +import android.annotation.SuppressLint; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; @@ -128,7 +127,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements // This has to be called before setContentView and you must use the //TODO: remove this deprecated code with toolbar if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW); + setWindowOptionsDeprecated(); } super.onCreate(icicle); app = (OsmandApplication) getApplication(); @@ -174,6 +173,12 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements }); } + @SuppressLint("NewApi") + private void setWindowOptionsDeprecated() { + getWindow().setUiOptions( + ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW); + } + private void setupHeader() { header = getLayoutInflater().inflate(R.layout.osmo_groups_list_header, null); getExpandableListView().addHeaderView(header);