Conflicts:
	OsmAnd/res/values/strings.xml
This commit is contained in:
Victor Shcherb 2014-07-31 00:17:38 +02:00
parent 4ed026d49c
commit 5b51255b38
2 changed files with 25 additions and 1 deletions

View file

@ -11,6 +11,19 @@
-->
<string name="map_preferred_locale_descr">Preferred lanaguage for labels on the map (if it is not available will switch to English or to local names)</string>
<string name="map_preferred_locale">Map prefferred language</string>
<string name="osmo_leave_confirmation_msg">Leave group %1$s?</string>
<string name="osmo_specify_tracker_id">Please specify tracker id</string>
<string name="continue_navigation">Continue Navigation</string>
<string name="pause_navigation">Pause Navigation</string>
<string name="keep_navigation_service">Keep</string>
<string name="rendering_attr_subwayMode_name">Subway mode</string>
<string name="keep_navigation_service">Keep</string>
<string name="stop_navigation_service">Stop</string>
<string name="enable_sleep_mode">Enable sleep mode</string>
<string name="gps_wake_up_timer">GPS wake up interval</string>
<string name="sleep_mode_stop_dialog">Keep GPS on?</string>
<string name="map_preferred_locale_descr">Preferred language for labels on the map (if it is not available will switch to English or to local names)</string>
<string name="map_preferred_locale">Map preferred language</string>
<string name="local_map_names">Local names</string>
<string name="lang_sw">Swahili</string>
<string name="lang_he">Hebrew</string>

View file

@ -431,7 +431,9 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
Builder bld = new AlertDialog.Builder(OsMoGroupsActivity.this);
String name = (selectedObject instanceof OsMoDevice)? ((OsMoDevice) selectedObject).getVisibleName() :
((OsMoGroup) selectedObject).getVisibleName(OsMoGroupsActivity.this);
bld.setTitle(getString(R.string.delete_confirmation_msg, name));
bld.setTitle(getString(
selectedObject instanceof OsMoDevice? R.string.delete_confirmation_msg :
R.string.osmo_leave_confirmation_msg, name));
bld.setPositiveButton(R.string .default_buttons_yes, new DialogInterface.OnClickListener() {
@Override
@ -814,11 +816,15 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
if(isChecked) {
labelTracker.setText(R.string.osmo_connect_to_device_tracker_id);
labelName.setText(R.string.osmo_connect_to_device_name);
name.setVisibility(View.VISIBLE);
labelName.setVisibility(View.VISIBLE);
mgv.setVisibility(View.GONE);
} else {
labelTracker.setText(R.string.osmo_connect_to_group_id);
labelName.setText(R.string.osmo_group_name);
name.setHint(R.string.osmo_use_server_name);
name.setVisibility(View.GONE);
labelName.setVisibility(View.GONE);
mgv.setVisibility(View.VISIBLE);
}
}
@ -833,6 +839,11 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
final String nameUser = name.getText().toString();
final String id = tracker.getText().toString();
final String nick = nickname.getText().toString();
if(id.length() == 0) {
app.showToastMessage(R.string.osmo_specify_tracker_id);
connectToDevice();
return;
}
if(device.isChecked()) {
OsMoDevice dev = osMoPlugin.getGroups().addConnectedDevice(id, nameUser,
ColorDialogs.getRandomColor());