From d212c501fa3f95982050f66f5a70bbc9861d96c5 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 14 Jun 2015 19:10:46 +0200 Subject: [PATCH] Add wiki types for download --- OsmAnd-java/src/net/osmand/data/Amenity.java | 4 +- .../res/drawable-hdpi/ic_action_wikipedia.png | Bin 0 -> 1195 bytes .../res/drawable-mdpi/ic_action_wikipedia.png | Bin 0 -> 729 bytes .../drawable-xhdpi/ic_action_wikipedia.png | Bin 0 -> 1749 bytes .../drawable-xxhdpi/ic_action_wikipedia.png | Bin 0 -> 2673 bytes OsmAnd/res/layout/download.xml | 40 +++++--- .../plus/download/BaseDownloadActivity.java | 52 ++++++---- .../plus/download/DownloadActivity.java | 89 +++++++++++++++++- .../plus/download/DownloadIndexFragment.java | 3 +- .../plus/download/DownloadIndexesThread.java | 7 +- .../download/DownloadOsmandIndexesHelper.java | 2 +- .../plus/download/UpdatesIndexFragment.java | 3 +- .../net/osmand/plus/views/POIMapLayer.java | 4 +- 13 files changed, 158 insertions(+), 46 deletions(-) create mode 100755 OsmAnd/res/drawable-hdpi/ic_action_wikipedia.png create mode 100755 OsmAnd/res/drawable-mdpi/ic_action_wikipedia.png create mode 100755 OsmAnd/res/drawable-xhdpi/ic_action_wikipedia.png create mode 100755 OsmAnd/res/drawable-xxhdpi/ic_action_wikipedia.png diff --git a/OsmAnd-java/src/net/osmand/data/Amenity.java b/OsmAnd-java/src/net/osmand/data/Amenity.java index 3a3474a381..cc9cd573d9 100644 --- a/OsmAnd-java/src/net/osmand/data/Amenity.java +++ b/OsmAnd-java/src/net/osmand/data/Amenity.java @@ -200,11 +200,13 @@ public class Amenity extends MapObject { return ""; } - public List getNames(String tag) { + public List getNames(String tag, String defTag) { List l = new ArrayList(); for (String nm : getAdditionalInfo().keySet()) { if (nm.startsWith(tag+":")) { l.add(nm.substring(tag.length() +1)); + } else if(nm.equals(tag)) { + l.add(defTag); } } return l; diff --git a/OsmAnd/res/drawable-hdpi/ic_action_wikipedia.png b/OsmAnd/res/drawable-hdpi/ic_action_wikipedia.png new file mode 100755 index 0000000000000000000000000000000000000000..47977801416f4525e01e368b29379713d5761079 GIT binary patch literal 1195 zcmV;c1XTNpP)}Ne|t^fM3%kzjSzBI-CX9VEC zW^ly7h=Gm~7^P6h0Cqk;VxV&fJ1Y49G7u4O1KUj!pw*IQN5nK>8L)GW>?%oP5pf!D zZ4X^n0dD{g1AFz5Stsd`y1kwZM8x;N_LBgxbGt{xF6qFoHL{;enh_E6fV+C=IvaR4 zb?nnaX04JT%+h1PnI#2tB`qy0jEF6PXMm&f z`#NBjq>mD$_g4T%10VWV(hn6K4$=#N)5VUDN&0QFIv=QrBf?JEIXmIyoSiM{*NOwq z^~Xyr+%D;`|o&rux1*Z38Nd`5(YFJp4 z#qIQPWDm;Uld6%8h)sc~GZo)ShBl;VX9hBY&U=HfA+P0<%4xOXV|JV}3o`*1=beDl z!N8xdiTZk9 z9e2ULYhVBg;w->U6z5zAPK~NF)mreri~1Nz@7Kuh2fUJ<>Pkts_4PajngVc_cn&x; z&o7hYs8s<}JCgSoOPXKjSVY_kTmh^C4wK~C8E7>EkSv^^{o8-t29J>RaSe!~>)3|7 z)!~xft&#J-XNw2o4U(=O$n!P~BmfVjmx29L$0AAB)Ht?dw%a{&?`lam*T}gu8Q3=o z^0R*wK!UggxFZeOplScMY&ar3MO~N$%a$_>c65A2#1i0QV0>o$8vuNPdkxq-jm?vE zcVRfM7B2z^R-Bnopb;?xcpcaxJI_X`*bhwO8YnsGTV#L37i4k1AGlkmlTb?Z!(GN zlt+YVzc=?hnJ)rvvO~a9NplmZ=SG(tl>xulJVEzO>yG-?z;{`c zpC$m?@vE(1!E?dGZf(lBHd?Jt0MfZ~OD&vOC~3kIG9s!hSazJHR^E3_p#X2aj=~S7Sz29nxYvRfTo6rB|ic% ztVp)iGh(1^5P)5LFZR8Q6wU$Xro2G}Q=h1USl9#rmIq_1)fifbs z)>dp-Ip9Efjfj;}V?|2n(p9(m_2+s1e{Ve}|NG=u_jUiS@AvxN*Y~=mhnGE!Pm@4X zfu;g4DG(8tfqpgiyrX^;5$l0(DzSgn2@!D&7+2Zf0{jCUs>$;}9a-Ib6@lfzFkmIn z8#o2*QFlkgRG`i~4)z+>%mAt9s;BQ@2|eL_}7VM9!(>D~ZPde*yi01X-Kat1~NS z^7{S+1^}bgEaatCk3c5R`^+^;y;1?#4}1ya)$|4Cs=rm@Gk|Q)wd&@s-kf>_vWh=| zkAa`nZz}*(N`-l5m%6kH5)pY7gMmrvgEt~j8Y$iIBX9?ppk{YxqxJ$4B%QHcT~Q%7 zv^3- zjff<&8n^*`m@27l5s|W|^$x4wcL&~(0)@Z_Kvt69Y`jar3E)>C?UmmrWq{@ESO*MO zZ@m)&g~aYMm=f?VFdvu(Tr9otDXa!yb>^nRSuuevQORzffwHIP`B3jJ|CTVGw{97y|sWop{8q4in>8p`;ZhnfVM3N#hyaRr_OGG6f^1B8XD00000 LNkvXXu0mjf1KdQR literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_wikipedia.png b/OsmAnd/res/drawable-xhdpi/ic_action_wikipedia.png new file mode 100755 index 0000000000000000000000000000000000000000..79fdc08156f1cd3fecb342c09e94a187b3fc5446 GIT binary patch literal 1749 zcmV;`1}gc9P)JhKYiMX;@&PWM0q-F9jxE@-kk^)MygT)Q}W4wepIJ z{-N0gL==lMMe_pAlvrAWBFk;!@G|$gZ2SCSwd5%Em0`r^zT@dVCpmTwFjzH%E^PB)(7U*1{bAbT}M8p%o_Co@- zLeg>8jfe%nZwI{hf}|5u|3cv8KKg$JmP%R~5k~{xhk-7*CVYtL>2zEuOv0Nen4J#`=TXGw4MSl0mm0yrw4-wB*q0X4`! z{Cpq->Wf6g{=j{}ZpE`#OkYVa_At~3d%YG*Ox3SR`hCHeuL8Fgw|Ryn@6{*~@fF~9 zz(Dx+4OVsg!<>I405$;}v42?X5J}ZbB$>7wNko{&O98)M$z77xNB)TL_s%#6=R>pV zdy>}n0pORwk@@`QWMNPJrgd5~AdPiUbf75%+e%=Gq(AlmV0YkNzznLy#_l3%O+*|3 zJe?05NA{5Pk3NUr0dOp-Z1}9CKM!^7h0;g>BnZDNZmU}IDoGdjF}h+-$pYu}-z0<1 z%6A`=^u>OMiHMT``@H4v30Pwc>bK5p0I&f+N&l<%Fe~;d16#RyL^w6t$DPJ1`IWN) z@SThijuod#daMtS3)A-x%}jB*BnRi#G8+IK*qjm#L@A#u16$pqhKyjk`{umf|LpgG zne_hwOu7wyatKMh>##{o>ROGlmKfi2ABVu3RPr&9`#5j^4UIb*bz#ZL8aEl1{ z2d?@)k@3bXX^byz4nHSBu-q`avxkcBd>H3-x3z9~Tm!htIW=|sy$2i4>t#mpoWNDy zdWi^ke5d4pU1OAuSlcsipg(5}NJH(@t^-QnzCKy-eok`k$dcFXtAnHu?*MvPMt3h| z`tO$0A2&N*(-R_RihU#v8nq1#%A5j_Alw3cv#`Jc%L5KKEbapi%L>jjJ-5$mBf=9V z`~J+Wr@y;ka;$hH*K=`ouq3zNb0XsaplM*@TQ?A%BsrkD?X_!EvpduLSm1%;R0hly zrvG{3CB(F7RG7bP-7+q!B7goLrIJZ~Dl7pNZsTs-nVcmV)-}@cA)Z+n=@RG%sjd&a(cV*?;r z;F8uwj>R>Bt2fUDdrCt_a9r5C&8WK#GUEoI9GJKs@NWk*C2lW6YZ>86Ntd)aR2$uK z1K{ZG+;1Qbl=SQ{#uXXC!O!Eaq23#2?Yhob0Z2FSj~$*H9@FcWqaN|V8NuoE>NfAS z1!3#}v^8kb`W*n1Mts`#>liR?H!^8^ItEM{@oC$yW5BfC$fWJ*7%*wXr)|HE0n>IP rleVX0z@!nMw*5K=Oxul2+MW*pd?+zrAi5lC00000NkvXXu0mjf?E*%R literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_wikipedia.png b/OsmAnd/res/drawable-xxhdpi/ic_action_wikipedia.png new file mode 100755 index 0000000000000000000000000000000000000000..aba973d2d4a6c0b624ee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ZIbaO(1>)Bay5B9 zyyKxyY+vfM@{)E)0ih|qAsnp2>gm_=^{#qHnllQ~iv0`ge-4iE?a>6T%IH#UY*F&N zG1HT8ub#`%QwF0~(=HH(8r_+A9 z;JC>g-jvYtG#_p1JFZVv`7yo|&Hge-VL9ky#+8N&tz78@_kP|csCA>hH9wH?ZS;Ub zslWhE@^#$+@p4*PTd5giGPp~FcLIjv$d6!gT{NB1tisz_qj3|Z&Ex_igxtYE=0!~^ z-g@vtEVK8}0WlkoBJ$CJ!;e#oH#hb}cw%F)A3Q$Ke32HH^?tF-ApED>>zT!uCK!In z3^Mm<^iAmeixt0rJa`P_`>SExYh`^`(UxX~`V+Zpi96jcv=O<;oFf{Es9v@X{!Lx< zq+D%y6|1r8DboqZ@tgiKuMS1*#~ZBg4L(H|)0;>Y;Wb=(HyJwrFv3=8J6$EC#!>#+ zNJIcLx-L4PWpgU4O?z66NN^QS6YeKWdF>!E5$8h_+TT!uoffgnrfW)X5{}_0JA85U zb&&A}k>KX(8#92<47`CdVSbx%RUV3-c>lEQ#_wGdiR-Z}-<`YQf5{j*`- ziJ~dwH8*eJiG`}0PtF>5d>b--omM(Yfdh7S%GCF2n`jn4E(Vf3NS1sOIv1ynBk&cf zs(|_#+sRpuSNAULvCY8>zCmn^$HeiOW6&Bc_{dWE1+j9T;1hw1IlA%wErS-3@znd+ z=_w*Y@17(n5Pr*ly3}PWX>LbVr3}nWRdp+Uc(K1^&$zzev~K%UYZPcvU>um%E@8@7 z-JSJ%9gfIr#v4x>Kj13zU?DFKIc!%m3aSB8zwph0t4d4p3o4bn??Y8Gf&~7~^o1N}JLhek^zcyI?KMCTJLDI95d2@L>c7}*w + android:orientation="vertical" > + tools:visibility="visible" > + android:orientation="horizontal" > + android:orientation="horizontal" > - -