diff --git a/OsmAnd/res/layout/dash_osmo_item.xml b/OsmAnd/res/layout/dash_osmo_item.xml index 5905251d3f..8c27b02c7f 100644 --- a/OsmAnd/res/layout/dash_osmo_item.xml +++ b/OsmAnd/res/layout/dash_osmo_item.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/expandable_list_item_background" android:minHeight="@dimen/dashListItemHeight" android:orientation="vertical"> diff --git a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java index 04b342ec85..17bdce8ad1 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java @@ -174,17 +174,29 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups return; } + String trackerId = plugin.getService().getMyGroupTrackerId(); List devices = - new ArrayList<>(mainGroup.getVisibleGroupUsers(plugin.getService().getMyGroupTrackerId())); + new ArrayList<>(mainGroup.getVisibleGroupUsers(trackerId)); - while (devices.size() > 3) { - devices.remove(devices.size() - 1); + if (devices.size() > 3) { + while (devices.size() > 3) { + devices.remove(devices.size() - 1); + } + } else { + if (groups.size() > 0){ + for (OsMoGroupsStorage.OsMoGroup grp : groups) { + if (grp.getVisibleGroupUsers(trackerId).size() > 0) { + + } + } + } } + setupDeviceViews(contentList, devices); - if (devices.size() < 3 && groups.size() > 0) { - setupGroupsViews(3 - devices.size(), groups, contentList); - } +// if (devices.size() < 3 && groups.size() > 0) { +// setupGroupsViews(3 - devices.size(), groups, contentList); +// } } private LinearLayout getClearContentList(View mainView) {