From 36ef4d83071e6fed88674bd6e003b53a34647330 Mon Sep 17 00:00:00 2001 From: Denis_Bars Date: Fri, 1 Aug 2014 19:15:59 +0300 Subject: [PATCH] Implemented waypoint dialog --- .../src/net/osmand/data/FavouritePoint.java | 4 +- .../src/net/osmand/data/LocationPoint.java | 16 ++ OsmAnd/project.properties | 1 - .../ic_action_core_overflow_dark.png | Bin 0 -> 342 bytes .../ic_action_core_overflow_dark.png | Bin 0 -> 216 bytes .../ic_action_core_overflow_dark.png | Bin 0 -> 355 bytes .../ic_action_core_overflow_dark.png | Bin 0 -> 617 bytes OsmAnd/res/layout/waypoint_reached.xml | 63 +++-- OsmAnd/res/values/strings.xml | 1 + OsmAnd/src/net/osmand/plus/GPXUtilities.java | 24 +- .../net/osmand/plus/OsmandApplication.java | 12 +- .../net/osmand/plus/TargetPointsHelper.java | 101 ++++++-- .../plus/activities/FavouritesActivity.java | 15 +- .../osmand/plus/activities/MapActivity.java | 4 +- .../RoutePointsPlugin.java | 14 +- .../plus/routing/RouteCalculationResult.java | 35 +-- .../osmand/plus/routing/RouteProvider.java | 9 +- .../osmand/plus/routing/RoutingHelper.java | 14 +- .../plus/sherpafy/WaypointDialogHelper.java | 235 +++++++++++++----- .../osmand/plus/views/MapControlsLayer.java | 57 ++--- .../plus/views/controls/MapControls.java | 33 ++- .../views/controls/MapNavigateControl.java | 3 +- .../views/controls/MapRouteInfoControl.java | 1 + 23 files changed, 432 insertions(+), 210 deletions(-) create mode 100644 OsmAnd-java/src/net/osmand/data/LocationPoint.java create mode 100644 OsmAnd/res/drawable-hdpi/ic_action_core_overflow_dark.png create mode 100644 OsmAnd/res/drawable-mdpi/ic_action_core_overflow_dark.png create mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_core_overflow_dark.png create mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_core_overflow_dark.png diff --git a/OsmAnd-java/src/net/osmand/data/FavouritePoint.java b/OsmAnd-java/src/net/osmand/data/FavouritePoint.java index 5eb38e8c58..fb151c4d57 100644 --- a/OsmAnd-java/src/net/osmand/data/FavouritePoint.java +++ b/OsmAnd-java/src/net/osmand/data/FavouritePoint.java @@ -2,7 +2,7 @@ package net.osmand.data; import java.io.Serializable; -public class FavouritePoint implements Serializable { +public class FavouritePoint implements Serializable, LocationPoint { private static final long serialVersionUID = 729654300829771466L; private String name; private String category = ""; @@ -16,6 +16,8 @@ public class FavouritePoint implements Serializable { public FavouritePoint(){ } + + public FavouritePoint(double latitude, double longitude, String name, String category) { this.latitude = latitude; this.longitude = longitude; diff --git a/OsmAnd-java/src/net/osmand/data/LocationPoint.java b/OsmAnd-java/src/net/osmand/data/LocationPoint.java new file mode 100644 index 0000000000..f09512a055 --- /dev/null +++ b/OsmAnd-java/src/net/osmand/data/LocationPoint.java @@ -0,0 +1,16 @@ +package net.osmand.data; + +/** + * Created by Натали on 01.08.2014. + */ +public interface LocationPoint { + + public double getLatitude(); + + public double getLongitude(); + + public String getName(); + + public int getColor(); + +} diff --git a/OsmAnd/project.properties b/OsmAnd/project.properties index da75a72a89..8e1b6c02d0 100644 --- a/OsmAnd/project.properties +++ b/OsmAnd/project.properties @@ -11,5 +11,4 @@ split.density=false # Project target. target=android-19 -android.library.reference.1=../SherlockBar dex.force.jumbo=true diff --git a/OsmAnd/res/drawable-hdpi/ic_action_core_overflow_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_core_overflow_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a074c10d05c6d899bbbde731fb5473e24d6c3448 GIT binary patch literal 342 zcmV-c0jd6pP)~5+$zEa2WS0eCh2jzeq2r8fm1qBQrmjmA<%sFqcKQZLJq?FcS>0b>f4uHT8{bvTq z69_CtKn^ryKoM#&AR1!h8eL$2WC(f1EwpbTa$_mQfl}Z+eMG>c60?Tl0Itz3Ku-jO$pPaXP=pjAuL4Gd=GY$^J#M&050U<#XDLHm3Y@2p2zXRt)=(V4 zS7Hp%0|WR2GjJ?LibX*0fY%{8ps$2CD@L6n^sf=>gILdS{fT$r9!$>rI3+@*z**~AJSs73Y87gIG5Y}hDgXcg07*qoM6N<$f|uTcod5s; literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-mdpi/ic_action_core_overflow_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_core_overflow_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..b6d614fcaf9c09be7b183a030a3ebbbb10b3e1fa GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJ`JOJ0ArbD$DG~_>EDn4#?y*WR zVL8Fq`2YX^*G$3&{838#&YU>$qjgG)Zzr=DgD#ULlcWlRY(eD}MrAdYu1331m(RKU z2D~;4yg4Q$aoTN7dEUfW&agpd23tvs*(_(H#=wGJk>e9(nH<=ArZF#8JizFa};-(qhim7_wlrZ6wQ`Z2@OK*A|ui`6o(K!>ti57FC=Z9P^D3{@YZ6nEH#R|1{N N;OXk;vd$@?2>?H}N00yj literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_core_overflow_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_core_overflow_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..7be3c2a4f1d0b81421e8501a11ae24979859d7ff GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVAS$-aSW-5dpm2R;2{GZ*T<8R z1+A>2)E1<%swJ=k(JLMYU(cfoA|-CZ1y&`~=Kj|ITE3*F{^T#uQz~_$AD_=xU|{Vq zcHr#bZcy{!3}AZ11H?=x>{+wcRx8)OR`?g^RcTeA=uyQf!I*yf$BPrcl34D@>=0mK za{BUjqXcUJ(-($W3d#QFD7zxy*T*G!!YoG o$L@>D;vyHCzfMd#rTu_AqjRZaLwZ;`Fz^^WUHx3vIVCg!0Pv)U0RR91 literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_core_overflow_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_core_overflow_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a0cb8a4182ccd233621c13bdd0ff6f9b5e84821c GIT binary patch literal 617 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>U^4J@aSW-5dpl=iu9KsH%g!5u zJEIi~ncp>@2(>5_PTAtX$`{jJtaSW-_meXo)>fG&Rv$aQryZ$Y&^LN zhE29@8-w;eI~hh><<~4sYbt&huzcxRBh0bk(c8m<7mPRgDIDn9&hPGU{)AN{PKDt@ z8`f|Cd}sgC-NM&@nSZGU+rzX*r0F3C$D#e9$_$K&Ob@Hfz|^l)vjuvm_KU3E?in}# ztMM0;%4=0Qs*HC;6aQ+MJiIe)(vtYQ91abw4EGtu)>LUQm4r?6WQo}DY9Ysk$VfH8 zgoCTvl^oJjXSy`7u9oX!m^(F92(IwtR2Cc2#@llRjn~irW&O*l_(E-(Bx9by${Lm> zC;op`LUsqpIZ}*r*A^CT@+}O!*A~X@)^O~kSu2Bdl&%D$l=^KErksqe2`m|Na)LQF zEWFwzxB#e9@c>?hstxU>H(uBk7=#}=^hvOx!Jx6gR+mdKI;Vst0GjmhsQ>@~ literal 0 HcmV?d00001 diff --git a/OsmAnd/res/layout/waypoint_reached.xml b/OsmAnd/res/layout/waypoint_reached.xml index 73acb3bcb4..0613ff603e 100644 --- a/OsmAnd/res/layout/waypoint_reached.xml +++ b/OsmAnd/res/layout/waypoint_reached.xml @@ -1,35 +1,44 @@ + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="match_parent" + android:id="@+id/package_delivered_layout"> - + - + + + + + -