update widget

This commit is contained in:
Victor Shcherb 2015-01-26 01:50:55 +01:00
parent 52432ccea5
commit acd0302390
2 changed files with 4 additions and 8 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). 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 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="gps_status">GPS Status</string>
<string name="version_settings_descr">Download nightly builds</string> <string name="version_settings_descr">Download nightly builds</string>
<string name="version_settings">Builds</string> <string name="version_settings">Builds</string>
<string name="rendering_attr_streetLighting_name">Street lighting</string> <string name="rendering_attr_streetLighting_name">Street lighting</string>

View file

@ -153,17 +153,12 @@ public class MapInfoWidgetsFactory {
OsmandMonitoringPlugin.MINUTES, OsmandMonitoringPlugin.MINUTES,
null, vs, dm); null, vs, dm);
if (Version.isGpsStatusEnabled(app)) { if (Version.isGpsStatusEnabled(app)) {
Button sp = new Button(map); dlg.setNeutralButton(R.string.gps_status, new DialogInterface.OnClickListener() {
sp.setPadding((int)(7 * dm.density), (int)(5 * dm.density), (int)(7* dm.density), 0);
sp.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(DialogInterface dialog, int which) {
dlgshow[0].dismiss();
new StartGPSStatus(map).run(); new StartGPSStatus(map).run();
} }
}); });
ll.addView(sp);
} }
dlg.setView(ll); dlg.setView(ll);
dlg.setPositiveButton(R.string.default_buttons_ok, new DialogInterface.OnClickListener() { dlg.setPositiveButton(R.string.default_buttons_ok, new DialogInterface.OnClickListener() {