Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-04-14 20:40:30 +02:00
commit 4120563c95
10 changed files with 95 additions and 80 deletions

View file

@ -21,6 +21,11 @@ public abstract class AbstractPoiType {
return keyName; return keyName;
} }
public String getIconKeyName() {
return keyName.replace(':', '_');
}
public String getTranslation() { public String getTranslation() {
return registry.getTranslation(this); return registry.getTranslation(this);
} }

View file

@ -101,8 +101,8 @@ public class BinaryRoutePlanner {
if(TRACE_ROUTING){ if(TRACE_ROUTING){
printRoad(">", segment, !forwardSearch); printRoad(">", segment, !forwardSearch);
} }
if(segment.getParentRoute() != null) // if(segment.getParentRoute() != null)
System.out.println(segment.getRoad().getId() + " - " + segment.getParentRoute().getRoad().getId()); // System.out.println(segment.getRoad().getId() + " - " + segment.getParentRoute().getRoad().getId());
if(segment instanceof FinalRouteSegment) { if(segment instanceof FinalRouteSegment) {
if(RoutingContext.SHOW_GC_SIZE){ if(RoutingContext.SHOW_GC_SIZE){
log.warn("Estimated overhead " + (ctx.memoryOverhead / (1<<20))+ " mb"); log.warn("Estimated overhead " + (ctx.memoryOverhead / (1<<20))+ " mb");

View file

@ -112,11 +112,38 @@
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
<!-- CENTER -->
<FrameLayout <FrameLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" > android:layout_height="wrap_content" >
<!-- CENTER -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginTop="@dimen/map_button_margin"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/map_layers_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light" />
<ImageButton
android:id="@+id/map_compass_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_marginLeft="@dimen/map_small_button_margin"
android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/map_center_info" android:id="@+id/map_center_info"
@ -154,30 +181,6 @@
android:progress="60" android:progress="60"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginTop="@dimen/map_button_margin"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/map_layers_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle"
android:src="@drawable/ic_action_test_light" />
<ImageButton
android:id="@+id/map_compass_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_marginLeft="@dimen/map_small_button_margin"
android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle"
android:src="@drawable/ic_action_test_light" />
</LinearLayout>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
@ -211,7 +214,7 @@
android:layout_width="@dimen/map_small_button_size" android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size" android:layout_height="@dimen/map_small_button_size"
android:layout_gravity="top|center_horizontal" android:layout_gravity="top|center_horizontal"
android:background="@drawable/btn_inset_circle" android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light" /> android:src="@drawable/ic_action_test_light" />
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -127,7 +127,7 @@
android:id="@+id/map_layers_button" android:id="@+id/map_layers_button"
android:layout_width="@dimen/map_small_button_size" android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size" android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle" android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light" /> android:src="@drawable/ic_action_test_light" />
<ImageButton <ImageButton
@ -147,45 +147,7 @@
android:layout_weight="0.6" > android:layout_weight="0.6" >
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<!-- CENTER -->
<LinearLayout
android:id="@+id/map_center_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="@dimen/map_button_margin"
android:background="@drawable/btn_round"
android:visibility="gone"
android:orientation="vertical" >
<ImageView
android:id="@+id/map_lanes"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/map_lanes_dist_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:maxLines="1"
android:text="1048 km"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size_small" />
<ProgressBar
android:id="@+id/map_horizontal_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="@dimen/map_routing_progress_width"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginRight="@dimen/map_button_margin"
android:max="100"
android:progress="60"
android:visibility="gone" />
</LinearLayout>
<!-- RIGHT widgets colon --> <!-- RIGHT widgets colon -->
<LinearLayout <LinearLayout
@ -230,11 +192,50 @@
android:layout_width="@dimen/map_small_button_size" android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size" android:layout_height="@dimen/map_small_button_size"
android:layout_gravity="top|center_horizontal" android:layout_gravity="top|center_horizontal"
android:background="@drawable/btn_inset_circle" android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light" /> android:src="@drawable/ic_action_test_light" />
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
<!-- CENTER -->
<LinearLayout
android:id="@+id/map_center_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="@dimen/map_button_margin"
android:background="@drawable/btn_round"
android:visibility="gone"
android:orientation="vertical" >
<ImageView
android:id="@+id/map_lanes"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/map_lanes_dist_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:maxLines="1"
android:text="1048 km"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size_small" />
<ProgressBar
android:id="@+id/map_horizontal_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="@dimen/map_routing_progress_width"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginRight="@dimen/map_button_margin"
android:max="100"
android:progress="60"
android:visibility="gone" />
</LinearLayout>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

@ -775,8 +775,8 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
direction.setImageDrawable(draw); direction.setImageDrawable(draw);
PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType()); PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
if (st != null) { if (st != null) {
if (RenderingIcons.containsBigIcon(st.getKeyName())) { if (RenderingIcons.containsBigIcon(st.getIconKeyName())) {
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getKeyName())); icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getIconKeyName()));
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue())); icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));
} else { } else {

View file

@ -255,8 +255,8 @@ public class SearchPoiFilterFragment extends ListFragment implements SearchActiv
name = model.getName(); name = model.getName();
} else { } else {
AbstractPoiType st = (AbstractPoiType) item; AbstractPoiType st = (AbstractPoiType) item;
if (RenderingIcons.containsBigIcon(st.getKeyName())) { if (RenderingIcons.containsBigIcon(st.getIconKeyName())) {
icon.setImageDrawable(RenderingIcons.getBigIcon(getActivity(), st.getKeyName())); icon.setImageDrawable(RenderingIcons.getBigIcon(getActivity(), st.getIconKeyName()));
} else if (st instanceof PoiType } else if (st instanceof PoiType
&& RenderingIcons.containsBigIcon(((PoiType) st).getOsmTag() + "_" && RenderingIcons.containsBigIcon(((PoiType) st).getOsmTag() + "_"
+ ((PoiType) st).getOsmValue())) { + ((PoiType) st).getOsmValue())) {

View file

@ -388,7 +388,8 @@ public class ConfigureMapMenu {
ctx.getString(R.string.lang_es), ctx.getString(R.string.lang_fi), ctx.getString(R.string.lang_fr), ctx.getString(R.string.lang_es), ctx.getString(R.string.lang_fi), ctx.getString(R.string.lang_fr),
ctx.getString(R.string.lang_he), ctx.getString(R.string.lang_hi), ctx.getString(R.string.lang_hr), ctx.getString(R.string.lang_he), ctx.getString(R.string.lang_hi), ctx.getString(R.string.lang_hr),
ctx.getString(R.string.lang_hu), ctx.getString(R.string.lang_it), ctx.getString(R.string.lang_ja), ctx.getString(R.string.lang_hu), ctx.getString(R.string.lang_it), ctx.getString(R.string.lang_ja),
ctx.getString(R.string.lang_ko), ctx.getString(R.string.lang_lv), ctx.getString(R.string.lang_nl), ctx.getString(R.string.lang_ko), ctx.getString(R.string.lang_lt),
ctx.getString(R.string.lang_lv), ctx.getString(R.string.lang_nl),
ctx.getString(R.string.lang_pl), ctx.getString(R.string.lang_ro), ctx.getString(R.string.lang_ru), ctx.getString(R.string.lang_pl), ctx.getString(R.string.lang_ro), ctx.getString(R.string.lang_ru),
ctx.getString(R.string.lang_sk), ctx.getString(R.string.lang_sl), ctx.getString(R.string.lang_sv), ctx.getString(R.string.lang_sk), ctx.getString(R.string.lang_sl), ctx.getString(R.string.lang_sv),
ctx.getString(R.string.lang_sw), ctx.getString(R.string.lang_zh) }; ctx.getString(R.string.lang_sw), ctx.getString(R.string.lang_zh) };

View file

@ -666,9 +666,9 @@ public class WaypointHelper {
Amenity amenity = ((AmenityLocationPoint) point).a; Amenity amenity = ((AmenityLocationPoint) point).a;
PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType()); PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
if (st != null) { if (st != null) {
if (RenderingIcons.containsBigIcon(st.getKeyName())) { if (RenderingIcons.containsBigIcon(st.getIconKeyName())) {
return uiCtx.getResources().getDrawable( return uiCtx.getResources().getDrawable(
RenderingIcons.getBigIconResourceId(st.getKeyName())); RenderingIcons.getBigIconResourceId(st.getIconKeyName()));
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
return uiCtx.getResources().getDrawable( return uiCtx.getResources().getDrawable(
RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue())); RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));

View file

@ -189,8 +189,13 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
if ((last != lastUpdateTime) && (globalRecord || isRecording)) { if ((last != lastUpdateTime) && (globalRecord || isRecording)) {
lastUpdateTime = last; lastUpdateTime = last;
//blink implementation with 2 indicator states (global logging + profile/navigation logging) //blink implementation with 2 indicator states (global logging + profile/navigation logging)
setIcons(R.drawable.widget_monitoring_rec_inactive_day, if (globalRecord) {
R.drawable.widget_monitoring_rec_inactive_night); setIcons(R.drawable.widget_monitoring_rec_small_day,
R.drawable.widget_monitoring_rec_small_night);
} else {
setIcons(R.drawable.widget_monitoring_rec_small_day,
R.drawable.widget_monitoring_rec_small_night);
}
map.getMyApplication().runInUIThread(new Runnable() { map.getMyApplication().runInUIThread(new Runnable() {
@Override @Override

View file

@ -208,8 +208,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
String id = null; String id = null;
PoiType st = o.getType().getPoiTypeByKeyName(o.getSubType()); PoiType st = o.getType().getPoiTypeByKeyName(o.getSubType());
if (st != null) { if (st != null) {
if (RenderingIcons.containsIcon(st.getKeyName())) { if (RenderingIcons.containsIcon(st.getIconKeyName())) {
id = st.getKeyName(); id = st.getIconKeyName();
} else if (RenderingIcons.containsIcon(st.getOsmTag() + "_" + st.getOsmValue())) { } else if (RenderingIcons.containsIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
id = st.getOsmTag() + "_" + st.getOsmValue(); id = st.getOsmTag() + "_" + st.getOsmValue();
} }