Replace strings and icons

This commit is contained in:
Victor Shcherb 2015-03-11 00:34:10 +01:00
parent cff3be9a15
commit 6626fbfd51
6 changed files with 19 additions and 16 deletions

View file

@ -154,7 +154,6 @@
<string name="osmand_development_plugin_description">Shows the settings for development and debugging features like route simulation or rendering performance indication.</string>
<string name="debugging_and_development">OsmAnd development</string>
<string name="showed_on_map">Shown on map</string>
<string name="rename_failed">Rename failed.</string>
<string name="days_behind">days behind</string>
<string name="back_to_map">Back to map</string>

View file

@ -756,7 +756,7 @@ public class OsmandSettings {
new StringPreference("user_password", "").makeGlobal();
// this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition
public final OsmandPreference<Boolean> OFFLINE_EDITION = new BooleanPreference("offline_edition", false).makeGlobal();
public final OsmandPreference<Boolean> OFFLINE_EDITION = new BooleanPreference("offline_edition", true).makeGlobal();
// this value string is synchronized with settings_pref.xml preference name
public final CommonPreference<DayNightMode> DAYNIGHT_MODE =

View file

@ -181,7 +181,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
public static void updateCurrentTrack(View v, final Activity ctx, OsmandApplication app) {
if (OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) {
if (OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) == null) {
return;
}
if (v == null) {

View file

@ -22,7 +22,7 @@ public class TrackSegmentFragment extends SelectedGPXFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
MenuItem item = menu.add(R.string.showed_on_map).setIcon(R.drawable.ic_show_on_map).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
MenuItem item = menu.add(R.string.shared_string_show_on_map).setIcon(R.drawable.ic_show_on_map).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
selectSplitDistance();

View file

@ -10,10 +10,11 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
@ -69,6 +70,15 @@ public class OsmEditsFragment extends ListFragment {
dataPoints.addAll(l2);
listAdapter = new OsmEditsAdapter(dataPoints);
getListView().setAdapter(listAdapter);
getListView().setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
OsmPoint it = listAdapter.getItem(position);
openPopUpMenu(view, it);
}
});
}
@ -130,7 +140,7 @@ public class OsmEditsFragment extends ListFragment {
OsmandApplication app = getMyApplication();
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
MenuItem item = optionsMenu.getMenu().add(R.string.showed_on_map).
MenuItem item = optionsMenu.getMenu().add(R.string.shared_string_show_on_map).
setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_show_on_map));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
@ -141,7 +151,7 @@ public class OsmEditsFragment extends ListFragment {
return true;
}
});
item = optionsMenu.getMenu().add(R.string.local_openstreetmap_delete).
item = optionsMenu.getMenu().add(R.string.shared_string_delete).
setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_delete_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override

View file

@ -75,11 +75,6 @@ public class DashParkingFragment extends DashLocationFragment {
LatLon loc = getDefaultLocation();
LatLon position = plugin.getParkingPosition();
int dist = (int) (MapUtils.getDistance(position.getLatitude(), position.getLongitude(),
loc.getLatitude(), loc.getLongitude()));
String distance = OsmAndFormatter.getFormattedDistance(dist, getMyApplication());
((TextView) mainView.findViewById(R.id.distance)).setText(distance);
boolean limited = plugin.getParkingType();
String parking_name = limited ?
getString(R.string.parking_place_limited) : getString(R.string.parking_place);
@ -95,10 +90,9 @@ public class DashParkingFragment extends DashLocationFragment {
}
((TextView) mainView.findViewById(R.id.name)).setText(parking_name);
ImageView direction = (ImageView) mainView.findViewById(R.id.direction_icon);
// if (loc != null){
// updateArrow(getActivity(), loc, position, direction,
// (int)getResources().getDimension(R.dimen.dashboard_parking_icon_size), R.drawable.ic_parking_postion_arrow, heading);
// }
if (loc != null){
distances.add(new DashLocationView(direction, (TextView) mainView.findViewById(R.id.distance), position));
}