Simplify group management

This commit is contained in:
Victor Shcherb 2014-07-31 01:31:56 +02:00
parent 96112489b3
commit 2c27d55b39
2 changed files with 10 additions and 1 deletions

View file

@ -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
-->
<string name="osmo_invite">Invite...</string>
<string name="osmo_leave_confirmation_msg">Do you want to leave group %1$s?</string>
<string name="osmo_specify_tracker_id">Please specify id</string>
<string name="continue_navigation">Continue Navigation</string>

View file

@ -504,7 +504,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
protected void showGroupInfo(OsMoGroup group) {
protected void showGroupInfo(final OsMoGroup group) {
Builder bld = new AlertDialog.Builder(this);
bld.setTitle(R.string.osmo_group);
StringBuilder sb = new StringBuilder();
@ -530,6 +530,13 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
tv.setText(sb.toString());
bld.setView(sv);
bld.setPositiveButton(R.string.default_buttons_ok, null);
bld.setNegativeButton(R.string.osmo_invite, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
shareOsMoGroup(group.getVisibleName(app), group.getGroupId());
}
});
bld.show();
}
@ -785,6 +792,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
if(!checkOperationIsNotRunning()) {
return ;
}
joinGroup = true;
String op = osMoPlugin.getGroups().createGroup(name.getText().toString(), onlyByInvite.isChecked(),
description.getText().toString(), policy.getText().toString());
startLongRunningOperation(op);