Update ui to have selection and select individual users to track

This commit is contained in:
Victor Shcherb 2014-06-01 23:54:20 +02:00
parent 92f3624d29
commit ba1ca526ec
3 changed files with 28 additions and 14 deletions

View file

@ -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" />
<TextView
android:id="@+id/category_name"
style="@style/ListText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginTop="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:textSize="18sp" >
</TextView>
<include layout="@layout/check_item_rel"/>
<ImageButton
android:src="@drawable/ic_action_settings_dark" android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:focusable="false"
/>
<include layout="@layout/check_item_rel" />
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical" >
<ImageView
android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="1dp"
android:focusable="false"
android:src="@drawable/ic_action_settings_dark" />
</RelativeLayout>
</LinearLayout>

View file

@ -62,7 +62,7 @@
<string name="osmo_create_group">Create group</string>
<string name="osmo_server_operation_failed">OsMo Server operation failed</string>
<string name="osmo_activity">OpenStreetMap-Monitoring</string>
<string name="osmo_enable_tracker">Send my lcations</string>
<string name="osmo_enable_tracker">Send my locations</string>
<string name="osmo_control">OsMo quick access</string>
<string name="hours_ago">hours ago</string>
<string name="minutes_ago">min ago</string>

View file

@ -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());