Merge pull request #1002 from Bars107/master
Bugfixes and improvements.
This commit is contained in:
commit
a71c699aac
7 changed files with 41 additions and 16 deletions
|
@ -33,6 +33,7 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<ImageView android:visibility="gone"
|
<ImageView android:visibility="gone"
|
||||||
android:id="@+id/direction"
|
android:id="@+id/direction"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_width="10dp"
|
android:layout_width="10dp"
|
||||||
android:layout_height="10dp"/>
|
android:layout_height="10dp"/>
|
||||||
<TextView android:id="@+id/distance"
|
<TextView android:id="@+id/distance"
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
<string name="rendering_value_default_name">Default</string>
|
<string name="rendering_value_default_name">Default</string>
|
||||||
<string name="rendering_value_orange_name">Orange</string>
|
<string name="rendering_value_orange_name">Orange</string>
|
||||||
<string name="rendering_value_germanRoadAtlas_name">German Road Atlas</string>
|
<string name="rendering_value_germanRoadAtlas_name">German Road Atlas</string>
|
||||||
|
<string name="traffic_warning_railways">Railways</string>
|
||||||
|
<string name="traffic_waring_pedestrian">Pedestrian</string>
|
||||||
|
<string name="show_railway_warnings">Show railway warnings</string>
|
||||||
|
<string name="show_pedestrian_warnings">Show pedestrian warnings</string>
|
||||||
<string name="rendering_value_americanRoadAtlas_name">American Road Atlas</string>
|
<string name="rendering_value_americanRoadAtlas_name">American Road Atlas</string>
|
||||||
<string name="routing_attr_no_new_routing_name">Do not use v1.9 routing</string>
|
<string name="routing_attr_no_new_routing_name">Do not use v1.9 routing</string>
|
||||||
<string name="routing_attr_no_new_routing_description">Do not use v1.9 routing</string>
|
<string name="routing_attr_no_new_routing_description">Do not use v1.9 routing</string>
|
||||||
|
|
|
@ -822,6 +822,8 @@ public class OsmandSettings {
|
||||||
{
|
{
|
||||||
SHOW_LANES.setModeDefaultValue(ApplicationMode.DEFAULT, false);
|
SHOW_LANES.setModeDefaultValue(ApplicationMode.DEFAULT, false);
|
||||||
}
|
}
|
||||||
|
public final CommonPreference<Boolean> SHOW_PEDESTRIAN = new BooleanPreference("show_pedastrian", true).makeProfile().cache();
|
||||||
|
public final CommonPreference<Boolean> SHOW_RAILWAYS = new BooleanPreference("show_railways", true).makeProfile().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache();
|
public final OsmandPreference<Boolean> SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache();
|
||||||
public final OsmandPreference<Boolean> SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache();
|
public final OsmandPreference<Boolean> SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache();
|
||||||
|
|
|
@ -329,8 +329,9 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
|
||||||
return true;
|
return true;
|
||||||
} else if (preference == showAlarms) {
|
} else if (preference == showAlarms) {
|
||||||
showBooleanSettings(new String[] { getString(R.string.show_traffic_warnings), getString(R.string.show_cameras),
|
showBooleanSettings(new String[] { getString(R.string.show_traffic_warnings), getString(R.string.show_cameras),
|
||||||
getString(R.string.show_lanes) }, new OsmandPreference[] { settings.SHOW_TRAFFIC_WARNINGS,
|
getString(R.string.show_lanes) ,getString(R.string.show_pedestrian_warnings) ,
|
||||||
settings.SHOW_CAMERAS, settings.SHOW_LANES }, preference.getTitle());
|
getString(R.string.show_railway_warnings) }, new OsmandPreference[] { settings.SHOW_TRAFFIC_WARNINGS,
|
||||||
|
settings.SHOW_CAMERAS, settings.SHOW_LANES, settings.SHOW_PEDESTRIAN, settings.SHOW_RAILWAYS }, preference.getTitle());
|
||||||
return true;
|
return true;
|
||||||
} else if (preference == speakAlarms) {
|
} else if (preference == speakAlarms) {
|
||||||
showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings),
|
showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings),
|
||||||
|
|
|
@ -475,8 +475,19 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
TextView tv = (TextView) v.findViewById(R.id.header_text);
|
TextView tv = (TextView) v.findViewById(R.id.header_text);
|
||||||
tv.setText(getHeader(type, checked, ctx));
|
tv.setText(getHeader(type, checked, ctx));
|
||||||
|
v.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (type == WaypointHelper.POI && btn.isChecked()){
|
||||||
|
running[0] = position;
|
||||||
|
thisAdapter.notifyDataSetInvalidated();
|
||||||
|
selectPoi(running, thisAdapter, type, true, ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,9 @@ public class AlarmInfo implements LocationPoint {
|
||||||
TRAFFIC_CALMING(4),
|
TRAFFIC_CALMING(4),
|
||||||
TOLL_BOOTH(5),
|
TOLL_BOOTH(5),
|
||||||
STOP(6),
|
STOP(6),
|
||||||
MAXIMUM(7);
|
MAXIMUM(7),
|
||||||
|
PEDESTRIAN(8),
|
||||||
|
RAILWAY(9);
|
||||||
|
|
||||||
private int priority;
|
private int priority;
|
||||||
|
|
||||||
|
@ -41,6 +43,10 @@ public class AlarmInfo implements LocationPoint {
|
||||||
return ctx.getString(R.string.traffic_warning_payment);
|
return ctx.getString(R.string.traffic_warning_payment);
|
||||||
case 6:
|
case 6:
|
||||||
return ctx.getString(R.string.traffic_warning_stop);
|
return ctx.getString(R.string.traffic_warning_stop);
|
||||||
|
case 8:
|
||||||
|
return ctx.getString(R.string.traffic_waring_pedestrian);
|
||||||
|
case 9:
|
||||||
|
return ctx.getString(R.string.traffic_warning_railways);
|
||||||
}
|
}
|
||||||
return ctx.getString(R.string.traffic_warning);
|
return ctx.getString(R.string.traffic_warning);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DirectionDrawable extends Drawable {
|
||||||
if (favorite) {
|
if (favorite) {
|
||||||
canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth()/2);
|
canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth()/2);
|
||||||
Bitmap arrow = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_destination_arrow);
|
Bitmap arrow = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_destination_arrow);
|
||||||
canvas.drawBitmap(arrow, 0, 0, new Paint());
|
canvas.drawBitmap(arrow, null, new Rect(0,0,arrow.getHeight(), arrow.getWidth()), null);
|
||||||
} else {
|
} else {
|
||||||
canvas.rotate(angle, width / 2, height / 2);
|
canvas.rotate(angle, width / 2, height / 2);
|
||||||
Path directionPath = createDirectionPath();
|
Path directionPath = createDirectionPath();
|
||||||
|
|
Loading…
Reference in a new issue