From ba1ca526ece1477d1bc8c15d91a6fec433a2cc0e Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 1 Jun 2014 23:54:20 +0200 Subject: [PATCH] Update ui to have selection and select individual users to track --- OsmAnd/res/layout/osmo_group_item.xml | 30 ++++++++++++------- OsmAnd/res/values/strings.xml | 2 +- .../osmand/plus/osmo/OsMoGroupsActivity.java | 10 +++++-- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/OsmAnd/res/layout/osmo_group_item.xml b/OsmAnd/res/layout/osmo_group_item.xml index d725cd3b3e..c191f2bbfd 100644 --- a/OsmAnd/res/layout/osmo_group_item.xml +++ b/OsmAnd/res/layout/osmo_group_item.xml @@ -14,28 +14,36 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:paddingLeft="6dp" - android:src="@drawable/expandable_category_unpushed" /> - + android:src="@drawable/expandable_category_unpushed" /> - - + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 153633ae05..7e07c4f0fb 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -62,7 +62,7 @@ Create group OsMo Server operation failed OpenStreetMap-Monitoring - Send my lcations + Send my locations OsMo quick access hours ago min ago diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 09b40a8512..3a4330c102 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -440,6 +440,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements quitSelectionMode(); } }); + refreshList(); } private StringBuilder setFields(StringBuilder bld, int field, String value) { @@ -509,6 +510,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements private void quitSelectionMode() { selectedObject = null; actionMode.finish(); + refreshList(); } @Override @@ -912,7 +914,11 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements @Override public void onClick(View v) { - enterSelectionMode(model); + if (model != selectedObject) { + enterSelectionMode(model); + } else { + quitSelectionMode(); + } } }); } @@ -969,7 +975,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements osMoPlugin.getGroups().setGenColor(model, activeColor); } //Location location = tracker.getLastLocation(model.trackerId); - if(model.isEnabled()) { + if(!model.isEnabled()) { icon.setVisibility(View.INVISIBLE); label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC); label.setText(model.getVisibleName());