From 282425e1acd77c94f7387f15c26d598783515867 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Sun, 10 Jul 2022 19:17:14 +0200 Subject: [PATCH] [android] replace custom map buttons by FloatingActionButton Signed-off-by: Arnaud Vergnet --- android/res/drawable-hdpi/ic_follow.webp | Bin 336 -> 0 bytes .../drawable-hdpi/ic_follow_and_rotate.webp | Bin 364 -> 0 bytes android/res/drawable-hdpi/ic_not_follow.webp | Bin 370 -> 0 bytes android/res/drawable-mdpi/ic_follow.webp | Bin 236 -> 0 bytes .../drawable-mdpi/ic_follow_and_rotate.webp | Bin 248 -> 0 bytes android/res/drawable-mdpi/ic_not_follow.webp | Bin 234 -> 0 bytes android/res/drawable-xhdpi/ic_follow.webp | Bin 422 -> 0 bytes .../drawable-xhdpi/ic_follow_and_rotate.webp | Bin 434 -> 0 bytes android/res/drawable-xhdpi/ic_not_follow.webp | Bin 468 -> 0 bytes android/res/drawable-xxhdpi/ic_follow.webp | Bin 614 -> 0 bytes .../drawable-xxhdpi/ic_follow_and_rotate.webp | Bin 626 -> 0 bytes .../res/drawable-xxhdpi/ic_not_follow.webp | Bin 724 -> 0 bytes android/res/drawable-xxxhdpi/ic_follow.webp | Bin 792 -> 0 bytes .../ic_follow_and_rotate.webp | Bin 820 -> 0 bytes .../res/drawable-xxxhdpi/ic_not_follow.webp | Bin 998 -> 0 bytes android/res/drawable/bg_circle.xml | 7 -- android/res/drawable/bg_circle_night.xml | 7 -- android/res/drawable/bg_circle_pressed.xml | 7 -- .../res/drawable/bg_circle_pressed_night.xml | 7 -- android/res/drawable/bg_crown.xml | 5 - android/res/drawable/bg_crown_night.xml | 5 - .../res/drawable/button_navigation_circle.xml | 10 -- .../button_navigation_circle_night.xml | 9 -- android/res/drawable/ic_bookmarks.xml | 5 + android/res/drawable/ic_follow.xml | 5 + android/res/drawable/ic_follow_and_rotate.xml | 5 + android/res/drawable/ic_not_follow.xml | 5 + android/res/drawable/ic_search.xml | 5 + android/res/layout-land/layout_nav_search.xml | 89 +++++++------- .../layout-land/map_navigation_buttons.xml | 31 ++--- android/res/layout/layout_nav_search.xml | 111 ++++++++---------- android/res/layout/map_navigation_buttons.xml | 32 ++--- .../layout/map_navigation_buttons_zoom.xml | 17 +++ android/res/values/dimens.xml | 2 +- android/res/values/styles.xml | 24 ++-- android/res/values/themes-attrs.xml | 4 - android/res/values/themes-base.xml | 2 - android/res/values/themes.xml | 2 - .../maps/maplayer/MapButtonsController.java | 33 ++---- .../maps/widget/menu/MyPositionButton.java | 5 +- 40 files changed, 185 insertions(+), 249 deletions(-) delete mode 100644 android/res/drawable-hdpi/ic_follow.webp delete mode 100644 android/res/drawable-hdpi/ic_follow_and_rotate.webp delete mode 100644 android/res/drawable-hdpi/ic_not_follow.webp delete mode 100644 android/res/drawable-mdpi/ic_follow.webp delete mode 100644 android/res/drawable-mdpi/ic_follow_and_rotate.webp delete mode 100644 android/res/drawable-mdpi/ic_not_follow.webp delete mode 100644 android/res/drawable-xhdpi/ic_follow.webp delete mode 100644 android/res/drawable-xhdpi/ic_follow_and_rotate.webp delete mode 100644 android/res/drawable-xhdpi/ic_not_follow.webp delete mode 100644 android/res/drawable-xxhdpi/ic_follow.webp delete mode 100644 android/res/drawable-xxhdpi/ic_follow_and_rotate.webp delete mode 100644 android/res/drawable-xxhdpi/ic_not_follow.webp delete mode 100644 android/res/drawable-xxxhdpi/ic_follow.webp delete mode 100644 android/res/drawable-xxxhdpi/ic_follow_and_rotate.webp delete mode 100644 android/res/drawable-xxxhdpi/ic_not_follow.webp delete mode 100644 android/res/drawable/bg_circle.xml delete mode 100644 android/res/drawable/bg_circle_night.xml delete mode 100644 android/res/drawable/bg_circle_pressed.xml delete mode 100644 android/res/drawable/bg_circle_pressed_night.xml delete mode 100644 android/res/drawable/bg_crown.xml delete mode 100644 android/res/drawable/bg_crown_night.xml delete mode 100644 android/res/drawable/button_navigation_circle.xml delete mode 100644 android/res/drawable/button_navigation_circle_night.xml create mode 100644 android/res/drawable/ic_bookmarks.xml create mode 100644 android/res/drawable/ic_follow.xml create mode 100644 android/res/drawable/ic_follow_and_rotate.xml create mode 100644 android/res/drawable/ic_not_follow.xml create mode 100644 android/res/drawable/ic_search.xml create mode 100644 android/res/layout/map_navigation_buttons_zoom.xml diff --git a/android/res/drawable-hdpi/ic_follow.webp b/android/res/drawable-hdpi/ic_follow.webp deleted file mode 100644 index 5b926848ae1b528ce005b8c592e440830b09e454..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmV-W0k8g2Nk&FU0RRA3MM6+kP&iCG0RR9mN5Byf2SSi-Q-A4aroVS@H4?rx0gQ(aSZOs&XK~+ zGb>D96!Hq3t@@V2uQD>bcZ%?2Fq%`OJutpS@=kLqU!$0Ub*!-oufz*LZg2@_2Z4sY z_=M1u03g-g2YJMW04T2g4I#Mb>z9>;y`LpSxBb|%QXj9QE(>$74usntucS2N;x>W! ifm=ad&SeV)ZX9(LG>GVKsUUVG>OzT?+sstMe_a6Yotaty diff --git a/android/res/drawable-hdpi/ic_follow_and_rotate.webp b/android/res/drawable-hdpi/ic_follow_and_rotate.webp deleted file mode 100644 index 219c36e628289f2d22728c71ea1a56ab16baeaa4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 364 zcmV-y0h9hxNk&Fw0RRA3MM6+kP&iCj0RR9mN5Byf52B!L8^-)ew>u!_fBqS^jifkt z$uT@bB4kj&p&(&LL;?T;M1X`2Fd$9{0Duq`4H+O|hY$h?0d9aFKnNhfg4j{OLxm8q zB*`{y?Q?D0_Pe%w{=?dgz4r4@ME@s%{h=GdkP;TxOFxne$dMELOt zyP*ZN+^`4sPRIg4)&(yNBsDA#BpyiFV{NkY=b&Wm96Io9q^%)qrAy)>dUp zDh=f{rHR^vQ1GgD4brJYvqop5vmuj$c8bbaZ%ia`)w>30RAI16V{KwhA_=2O3L`Tk z0)dN}OTfMg3|H)1nOa$wfa>$9f`n~Dg;OsQ>75jYmif<;L(|6?WB%qra`xL*gm78* znA9sT1t{3n2Jl|w86WL-qm0jgyaBZBiXRVy7!!AZj)1Y);BbuFrQQen65?Nv4$yH! KwA+ok;lD6{DyWtK diff --git a/android/res/drawable-hdpi/ic_not_follow.webp b/android/res/drawable-hdpi/ic_not_follow.webp deleted file mode 100644 index e56bdbc15d1066820cf7c534cee029fb8fcbbd8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 370 zcmV-&0ge7rNk&F$0RRA3MM6+kP&iCo0RR9mN5Byf7cu|yKmQ8bHc~^!&x`>$K_Ora z2oMp7kAjH>1p*O4Ks*o-1j0Z@fdS!w$nbD*BuTasJ>1?0wsNp71z@VoKqcJ^dU}u;D#f2=qr*P59|qjf>q%K z)fbDbL33WZy6zTDV)!8P`c-SUY*1gkN~TGe?d;JF-po`?FL2n_M*H5y9+k^(cs~WJ zKO`cXRdX_lb*L5IvyP`097dPK>VRuaB23dzQ>c|sY-D@)o_t4cs~lRFNd($)nPUR5 za0QiAe?iY9eC-40J~zRt^fc4 diff --git a/android/res/drawable-mdpi/ic_follow.webp b/android/res/drawable-mdpi/ic_follow.webp deleted file mode 100644 index f57a1f63f84eab87fe589242830617cc6cc5b644..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 236 zcmVf2+J`jq4;lm*SCGoY&A9_8%@zfd(r*bA5!oUp=@r5sQZ} zH{T2yr?_%&2}!SgbN9y;x$wXqqRsDsPzF)=+H;1uot>slsT_cyy01Mf6@YnPsi3u5 m`ub{uX<>lg(?YB$n_Z#UevvFRp(Edps_4fSx|@rq?0*s^L~D)! diff --git a/android/res/drawable-mdpi/ic_follow_and_rotate.webp b/android/res/drawable-mdpi/ic_follow_and_rotate.webp deleted file mode 100644 index a4c0462d0dd6dbedd0252fc4a3fb5b843e0c2d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 248 zcmViCX4Y*Nx0N^o|vyw>fXT8o7 zV=?BrE?sF{thy}4T0x?BYn{#!VPnK`*>a(9u-ReAx8(#{yRFsKh1eOYJMTFwv$1?U yF2Pon&89;j5*(&krs@HVxh0EMJ^~L_r+aFOh%~i`h?(9`s@8!SGhbb^{V@S3X>X7K diff --git a/android/res/drawable-mdpi/ic_not_follow.webp b/android/res/drawable-mdpi/ic_not_follow.webp deleted file mode 100644 index 19e5b8ae90135b7a33233d62516b9b1b646b7053..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 234 zcmV5d{}zQUCw| diff --git a/android/res/drawable-xhdpi/ic_follow.webp b/android/res/drawable-xhdpi/ic_follow.webp deleted file mode 100644 index 43cdf0b63b6036c0e57ca9b1e57f9d0af08ba63b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 422 zcmV;X0a^Z1Nk&GV0RRA3MM6+kP&iDH0RR9mU%(d-Phuc#oA@_9`kR>l`B%`k4GY&l zg>Bn5N%!O(xD5cTg<%jvP!vG!B@7SXn+1r2M}SCp7y_^)or60UECL9IL%}3*@L1Gv z(Go!a5+FH}q)3WkW`^BiW>_BP{Qr}hyW+fx=>G)Zf2e`#kXo#FkSZ@vZut;71XzU{ zf1>Syb837Q-A9a(ulOOxOYn_$_F^_iC%d?d=|2ybVEtFDHo!D7xQOLzh=;eZd5Mi< zu#B{JVsDB>W_lBwKfo|h`xg6)1Y-SzIJozz=E<*~;%EnIhnj!l@I9(jYH}6F7f{z< z`V=>2)v4^nmA_E7EiSFAb9TuksLt9Y1E?FCz1;AMD+DA*C+9X$JW$>~9V(~>AlBVE zvGWoDJh}PJwiZ~1-+%16MQ8v>k4`pB!8LfamLY?Yr7y5eTdL8)kA*{k&zprl_=az$ zo-sn0nOcEy&QzX~XJ_KiLkV3IO>mAq4Xzl9ulP%m@Q+!m!~$&`uBtj1NJDk`JN?Bp*OqufGA0lY3p3yXWO=Izc>H?OZS{bY(Hxd(fZL+OwO+)a>i0#g zn5M{a3e$;;LFysr9z<(y2B^kvT*EU-o{Z<%N8xmnH=|kgQ!uqVKdWJxpn!(uD8vzz zE(&T$R>G_RsosWB#xYKT6~|#HhS5pE4aIUe22r^QcVigFD57H6kD(AcD5@e@io*cx zI?lDFH%gI5)7y)s$+c7T_S6=Ab_ZqGXCbljmD9_1e= zoYqd!<$N=9w)x8IheVcGtyhADSfF}PpkY-SpXv=EPFCM=dAf(ezGc(5wWU-Bk~!sHfoLC%;Cu-`U#+WLSd$)A%e911uHl!< zKTxm0uNOIfz3vCLut_4Ed9G~J zor9f>LgM69k^BM`<1lN(-R}$O9RR4B~1Ydz;d+e6PXBkQ?eUpbD7B@!f z$R$tb!E12lg*>jrS?S#>lIQ#2)5=|wj6-b17d}bKM=&{jP$5YtSO`o$k+g*X1Kq0y zl6VEGH!~MClDXEUxaiy)Nq!Ec5A2jl`n1CA@jLS2tEsHS@;CW%7K$D`cFCWmh?-(2 zwa0I2>BbTmp zDYXGeEWF9}Vki$VQu`%|X24@;>Oq!bkO=^N8$VKPfm3_r()F&F6#&k{t4G)1*GTP^ zyvQ*GAXXChY4Lr%t6+Uy zK&_j%J^>eC{=U5ocT;V>ncRg+?aYDwy*A2G{!(r1fPdq)wE+#lLQ8kh!Gzn&xEA2D zg>PFAMp{^g9@;-m+=M1zy~#0jvD0lds14X{Z~}b{zZ21COe5f&7S1~G|Nnmg1+xS% ArvLx| diff --git a/android/res/drawable-xxhdpi/ic_follow_and_rotate.webp b/android/res/drawable-xxhdpi/ic_follow_and_rotate.webp deleted file mode 100644 index d607c07685cccf1ab50f825a270d69bb259a4490..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmV-&0*(DrNk&F$0ssJ4MM6+kP&iCo0ssInkH8}kPoto18^-)e?+?TL&%eS(lF}F_ zxPv0MZ5#NM)$$z(F<{^X2GKyU4b!jG-9iBP5X!=Urvk7b2>n6K9(u_D2>x+M5YCXF zlmrn36cTN1G9;b4Tb*zifss`=V zSk37Zq%t1$Q3g)E5F_Dq6o*Ht3SuRUX5*PfDB~d>pMg&g#O(1oj7!j|gxD*vnTd~( zNxzTJ6E59gpx|;~!T~DfU}QNa(`I-?=*|owJi5TpEOcU#se3?exb`zlcf^_kOX=nzz|~gwOTnAXYD*5$UFEYX8N@u{`<>q!mUe; Md;rUcOZ-4~v=s1_u@v1_Qu>B;^p1V2}ZRGJt>t;E~`G9hU-D zAwdAxw2e|`W@cvm|KCYmFJ- zD4dL8*B-hB*h;$C1)jhikViYUyR7(lJme+(m>gF((-?w64ml%Y^B-;-f3@yrU|S?;ecj?#_V_(b`8uX4x}to zZ=3*HhA!e$+^9b65uvW?;|%R~Dx!jFKle;CSB z2iS&ip0ZFL{|0qVPxUdi&aqD&XrDS6?jw>KBuVrUV4pS6;7Fp+vQQstpFZ6};~4fC z=dsW@7&=ZE@=0lp6S95AQMHdVFDT4agcyh4kJNE^-lIw+#^KpM^AxOi9)}7V=eY=> zX&#UkTINZ~5qTb&B$4LX$&zlb@pTAmpJv*GSf^nJK7%d7k5AZVotS;r(JAW;|NqaQ GK>z@Up;E2@ diff --git a/android/res/drawable-xxxhdpi/ic_follow.webp b/android/res/drawable-xxxhdpi/ic_follow.webp deleted file mode 100644 index ef3563cb1fc6fe7fcec451ce44b2637fdd28541c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 792 zcmV+z1LyowNk&Ex0{{S5MM6+kP&iBk0{{RozrZgLpTnSS8$sqz`jzgU!~D;`g0u}- zv_FMy+cw?1%p1TrL8ul6YoR{aJru;ior7~607SNq1xoXvjsoqaGCtfmKhZS3lox+s z$ia{xaYIK4QkyNoqFQLJpAwL5+cq8Tmy~VWwr$%+Y@PpaC8>J4yH$wj{{-Ow|NsC0 zSu}Tei@J(cpA7S+wVx+Me7UR@%zQ}tDmbs*4@<^G1!K;>d&zzdzRQ+8^3`^_nor{L zCK!v#D!y025B<33m}o_C49wInqh#YE?OFq}K`Ec*8mRJrCC z13gZ5w9bo!7`g;*3uiyX;CLA|bq5hK`~_j-H#8m^oENM#+LpOnwb28;@gR`feg}N1w%lE(Z;j>wdB1JUG<4 zE|X%-STO~KbDv__BM?}37!eCMDlcc?Q7rug#h0&m#o{AsYdwpL)&02&%b$D~8(f33 ztG7d9hlxr>IeKqXVviS4a>=4wY_n5Er5jPP&ks#OV-c~_S*UkMY&Be{o)NLv1E}}K zX6h6aw3i1c_{v`TRa6tU6OU6xX!F|0GSpmp9Jh;jnWBJ-t$;n8LgBeXcS##)Q5k^B z6}Q#ipnR?KBxb1z^#LfFezi_0p8^2&djX4VfydmTyQBqDRYU-&SaF%|25f4bCoyyN z&;g)m`o%;p2O|LLcLQcw0Ij)$cS$qEN_YWKn>4{OxV<$&6FGy%J%ilbfMKKTVAm*r zEVo=Y}*Ef zrJ*9XZJX@&#CHHS!80KUg@M+w|M8j$?>`EUz-!1?D8n{JEP{TB1C#;~JxqK6GC$3- z;Njzc&5TV2_}8;y8F^-#B2mLCFT}?kQpD zxLxAt&8CgaNDfXNk`2$F^so0t&UEmj9W^557+`FM;e%g6Az zWLtove#JHpXzWtf?*b$5wS9rH7!?N@iwiC=6m=^ua2*mmm6JPx$b02RU>ruoQO4oC zD+ELBiYr`;!VYnkLCAgS&P&2zSUF4>oO3BaP_yh3)gZ84oF)KrU%18Ozaeov`0uQ1 zXT4Xw>>5@3Zkss2)pI$|O+B2FV2X15HmJ;A=!=+{E|`%)znw9$c(NnP7*2|bGhVA& z*7s#^Rg^gF{i2Vme6~e&Ki^ayrKU~Kb;%ZwWk1vOXf~g<3O&;FG}~XjO6%qRtVnwn z1ufF+uRR);PIa>3Kua3-`0H+}Z~JQ^3n_d{b=O~SQoPz+5m{QXIiw(eeM$6qO+l2t z?THeRC!C78AUsa=#b37*Tp!4abY7KM*1()K5E9(>*J#}0>7GdQLfnEDX6`w?7&q!K y9)Ixl*@cajk#?0)7jtE}_>At4N4T29_s@R|aSOOzjbq%}o~(Mpxc&eCzfl9zYm#jM diff --git a/android/res/drawable-xxxhdpi/ic_not_follow.webp b/android/res/drawable-xxxhdpi/ic_not_follow.webp deleted file mode 100644 index a0d85501fa6d36c56a6ab3e6b0fc2a267cb3b619..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 998 zcmVr{L)E<{>s+rWU{T5egPCE zJJ`8O97$q3gDhxBrg!k{*w{fY1Im$GxOP)w3pr4X?DB*2z=P?P_3WMVgw29VRF9oU zj;o*#Gf&PdPX^ksmN?HO2C9(VcLCVfTa( zHah9%T$PH(zOR`iqbE)3b%dL8*t9lcVn#~_(mstWGf zeq@d89!u^8XYZ(M*_W=7x`Ge2OqBn%?a$Y!Hl8h|C_u4rLb{&Z=MK zRYG|IWRfAK2u^%U8}589bT*`i7yYBxfR}s^yt9W}8%QLJPmjF?XuYd= zC(=Y_Ja8!MJhR%u$<1qeV+%E&)jIAy0DX4fH!?(hSt)jBd|q=+6=0d2%OgMqow}H(^kX8rR0V2Fpp>4 z2XU;Rg}$JrDld+KF}`q#TCIRMw$Vaw(o(yQ#V&2PiAouW;|wkI9O+d1;3cCEI)_S~ zf*k6H_jHYPNVNstHDz=UyR?{$7!7-L3>u`{iDP1C5`RW=IK_$^uHBqRrA|Q{(e+!lKpc3# z@sgHOvEMj#zx|WG>eFv0#!WK}tq|iTc|Mcj^bB8Z!kPw==k z1>nXFj{U_AY5+TK^I~&uGH!D&z2L`f>Oj!ASuF?{x2y-j;>J}WNZh_Q1lTvB58n5! zsD#&jLt5c+- - - diff --git a/android/res/drawable/bg_circle_night.xml b/android/res/drawable/bg_circle_night.xml deleted file mode 100644 index d6f2193191..0000000000 --- a/android/res/drawable/bg_circle_night.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/android/res/drawable/bg_circle_pressed.xml b/android/res/drawable/bg_circle_pressed.xml deleted file mode 100644 index d96c5d921a..0000000000 --- a/android/res/drawable/bg_circle_pressed.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/android/res/drawable/bg_circle_pressed_night.xml b/android/res/drawable/bg_circle_pressed_night.xml deleted file mode 100644 index f3ab612445..0000000000 --- a/android/res/drawable/bg_circle_pressed_night.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/android/res/drawable/bg_crown.xml b/android/res/drawable/bg_crown.xml deleted file mode 100644 index df34356d6c..0000000000 --- a/android/res/drawable/bg_crown.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/android/res/drawable/bg_crown_night.xml b/android/res/drawable/bg_crown_night.xml deleted file mode 100644 index 8e39462ade..0000000000 --- a/android/res/drawable/bg_crown_night.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/android/res/drawable/button_navigation_circle.xml b/android/res/drawable/button_navigation_circle.xml deleted file mode 100644 index 96536e113e..0000000000 --- a/android/res/drawable/button_navigation_circle.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/res/drawable/button_navigation_circle_night.xml b/android/res/drawable/button_navigation_circle_night.xml deleted file mode 100644 index 64e1bcd58c..0000000000 --- a/android/res/drawable/button_navigation_circle_night.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/res/drawable/ic_bookmarks.xml b/android/res/drawable/ic_bookmarks.xml new file mode 100644 index 0000000000..954e7723b3 --- /dev/null +++ b/android/res/drawable/ic_bookmarks.xml @@ -0,0 +1,5 @@ + + + diff --git a/android/res/drawable/ic_follow.xml b/android/res/drawable/ic_follow.xml new file mode 100644 index 0000000000..e14a53b610 --- /dev/null +++ b/android/res/drawable/ic_follow.xml @@ -0,0 +1,5 @@ + + + diff --git a/android/res/drawable/ic_follow_and_rotate.xml b/android/res/drawable/ic_follow_and_rotate.xml new file mode 100644 index 0000000000..d9510afe89 --- /dev/null +++ b/android/res/drawable/ic_follow_and_rotate.xml @@ -0,0 +1,5 @@ + + + diff --git a/android/res/drawable/ic_not_follow.xml b/android/res/drawable/ic_not_follow.xml new file mode 100644 index 0000000000..859760018c --- /dev/null +++ b/android/res/drawable/ic_not_follow.xml @@ -0,0 +1,5 @@ + + + diff --git a/android/res/drawable/ic_search.xml b/android/res/drawable/ic_search.xml new file mode 100644 index 0000000000..e2dd96c6d0 --- /dev/null +++ b/android/res/drawable/ic_search.xml @@ -0,0 +1,5 @@ + + + diff --git a/android/res/layout-land/layout_nav_search.xml b/android/res/layout-land/layout_nav_search.xml index ecf5d9ee3c..a2aed3137d 100644 --- a/android/res/layout-land/layout_nav_search.xml +++ b/android/res/layout-land/layout_nav_search.xml @@ -5,70 +5,73 @@ android:id="@+id/search_button_frame" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:theme="?navButtonsTheme" - android:padding="@dimen/nav_frame_padding" + android:clipChildren="false" + android:clipToPadding="false" android:layoutDirection="ltr" + android:padding="@dimen/nav_frame_padding" + android:theme="?navButtonsTheme" tools:background="@color/bg_primary"> - - - + android:layout_marginBottom="@dimen/margin_half" + android:contentDescription="@string/bookmarks" + android:src="@drawable/ic_bookmarks" /> - - - - + - - + - - + - - + - + style="@style/MwmWidget.MapButton.Search" + android:layout_gravity="center_vertical" + android:layout_marginStart="@dimen/margin_half" + android:contentDescription="@string/atm" + android:src="@drawable/ic_routing_atm_on" /> - - - + android:contentDescription="@string/search" + android:src="@drawable/ic_search" /> diff --git a/android/res/layout-land/map_navigation_buttons.xml b/android/res/layout-land/map_navigation_buttons.xml index 5a60328b33..f39dbb27cc 100644 --- a/android/res/layout-land/map_navigation_buttons.xml +++ b/android/res/layout-land/map_navigation_buttons.xml @@ -18,6 +18,8 @@ android:layout_height="match_parent" android:layout_marginTop="@dimen/menu_line_height" android:layout_marginBottom="@dimen/menu_line_height" + android:clipChildren="false" + android:clipToPadding="false" android:layoutDirection="ltr" android:padding="@dimen/nav_frame_padding" android:theme="?navButtonsTheme"> @@ -25,42 +27,29 @@ layout="@layout/layout_nav_search" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/margin_base" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" tools:visibility="visible" /> - - - - - + - - - - + android:layout_marginBottom="@dimen/margin_half" + android:contentDescription="@string/bookmarks" + android:src="@drawable/ic_bookmarks" /> - - - - - - - - - - + + + + - + android:layout_marginStart="@dimen/margin_half_plus" + android:layout_marginBottom="@dimen/margin_half" + android:contentDescription="@string/atm" + android:src="@drawable/ic_routing_atm_on" /> - - - + android:contentDescription="@string/search" + android:src="@drawable/ic_search" /> diff --git a/android/res/layout/map_navigation_buttons.xml b/android/res/layout/map_navigation_buttons.xml index 2a539aa4cf..944c89a5b9 100644 --- a/android/res/layout/map_navigation_buttons.xml +++ b/android/res/layout/map_navigation_buttons.xml @@ -18,6 +18,8 @@ android:layout_height="match_parent" android:layout_marginTop="@dimen/action_bar_extended_height" android:layout_marginBottom="@dimen/nav_my_position_bottom" + android:clipChildren="false" + android:clipToPadding="false" android:layoutDirection="ltr" android:padding="@dimen/nav_frame_padding" android:theme="?navButtonsTheme"> @@ -25,41 +27,27 @@ layout="@layout/layout_nav_search" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/margin_base" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" tools:visibility="visible" /> - - - - - + - + + + + \ No newline at end of file diff --git a/android/res/values/dimens.xml b/android/res/values/dimens.xml index 7c862f3b81..32764bdb35 100644 --- a/android/res/values/dimens.xml +++ b/android/res/values/dimens.xml @@ -138,7 +138,7 @@ 64dp 360dp - @dimen/margin_eighth + @dimen/margin_half 136dp 12dp diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml index 225a6be7ac..c1713fb780 100644 --- a/android/res/values/styles.xml +++ b/android/res/values/styles.xml @@ -9,12 +9,18 @@ + + - - diff --git a/android/src/com/mapswithme/maps/maplayer/MapButtonsController.java b/android/src/com/mapswithme/maps/maplayer/MapButtonsController.java index ced4f90a63..ab36314af2 100644 --- a/android/src/com/mapswithme/maps/maplayer/MapButtonsController.java +++ b/android/src/com/mapswithme/maps/maplayer/MapButtonsController.java @@ -1,22 +1,20 @@ package com.mapswithme.maps.maplayer; +import android.content.res.TypedArray; import android.os.Bundle; import android.view.View; -import android.widget.ImageButton; -import android.widget.ImageView; import android.widget.RelativeLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; -import androidx.constraintlayout.widget.ConstraintLayout; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.mapswithme.maps.R; import com.mapswithme.maps.routing.RoutingController; import com.mapswithme.maps.routing.SearchWheel; import com.mapswithme.maps.widget.menu.MyPositionButton; import com.mapswithme.maps.widget.placepage.PlacePageController; import com.mapswithme.util.Config; -import com.mapswithme.util.Graphics; import com.mapswithme.util.UiUtils; public class MapButtonsController @@ -26,7 +24,7 @@ public class MapButtonsController @NonNull private final View mZoomFrame; @NonNull - private final ImageButton mLayersButton; + private final FloatingActionButton mLayersButton; @NonNull private final View myPosition; @NonNull @@ -39,8 +37,7 @@ public class MapButtonsController private final SearchWheel mSearchWheel; private final PlacePageController mPlacePageController; private final float mBottomMargin; - private final int mButtonWidth; - private final float mInitialButtonMargin; + private final float mButtonWidth; private float mTopLimit; private float mContentHeight; private float mContentWidth; @@ -63,15 +60,18 @@ public class MapButtonsController mSearchButtonFrame = activity.findViewById(R.id.search_button_frame); mSearchWheel = new SearchWheel(frame, (v) -> mapButtonClickListener.onClick(MapButtons.navSearch)); - ImageView bookmarkButton = mSearchButtonFrame.findViewById(R.id.btn_bookmarks); - bookmarkButton.setOnClickListener((v) -> mapButtonClickListener.onClick(MapButtons.navBookmarks)); - bookmarkButton.setImageDrawable(Graphics.tint(bookmarkButton.getContext(), R.drawable.ic_menu_bookmarks)); + mSearchButtonFrame.findViewById(R.id.btn_bookmarks) + .setOnClickListener((v) -> mapButtonClickListener.onClick(MapButtons.navBookmarks)); // Used to get the maximum height the buttons will evolve in frame.addOnLayoutChangeListener(new MapButtonsController.ContentViewLayoutChangeListener(frame)); mBottomMargin = ((RelativeLayout.LayoutParams) mButtonsFrame.getLayoutParams()).bottomMargin; - mInitialButtonMargin = ((ConstraintLayout.LayoutParams) mZoomFrame.getLayoutParams()).bottomMargin; - mButtonWidth = mLayersButton.getLayoutParams().width; + + TypedArray a = frame.getContext().getTheme().obtainStyledAttributes( + R.style.MwmWidget_MapButton, + new int[] { R.attr.fabCustomSize }); + mButtonWidth = a.getDimension(0, 0); + a.recycle(); } public void showButton(boolean show, MapButtonsController.MapButtons button) @@ -109,15 +109,6 @@ public class MapButtonsController final float appliedTranslation = translation <= 0 ? translation : 0; mButtonsFrame.setTranslationY(appliedTranslation); - // Reduce buttons margin to move them only if necessary - // Zoom frame is above the layers so if must move twice as much - final float appliedMarginTranslationLayers = Math.min(-appliedTranslation, mInitialButtonMargin); - final float maxZoomTranslation = UiUtils.isVisible(mLayersButton) ? 2 * mInitialButtonMargin : mInitialButtonMargin; - final float appliedMarginTranslationZoomFrame = Math.min(-appliedTranslation, maxZoomTranslation); - mLayersButton.setTranslationY(appliedMarginTranslationLayers); - mSearchButtonFrame.setTranslationY(appliedMarginTranslationLayers); - mZoomFrame.setTranslationY(appliedMarginTranslationZoomFrame); - updateButtonsVisibility(appliedTranslation); } diff --git a/android/src/com/mapswithme/maps/widget/menu/MyPositionButton.java b/android/src/com/mapswithme/maps/widget/menu/MyPositionButton.java index 37f97c2050..fe02ffb6cc 100644 --- a/android/src/com/mapswithme/maps/widget/menu/MyPositionButton.java +++ b/android/src/com/mapswithme/maps/widget/menu/MyPositionButton.java @@ -8,6 +8,7 @@ import android.widget.ImageView; import androidx.annotation.NonNull; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.mapswithme.maps.R; import com.mapswithme.maps.location.LocationState; import com.mapswithme.maps.routing.RoutingController; @@ -20,7 +21,7 @@ public class MyPositionButton private static final int FOLLOW_SHIFT = 1; @NonNull - private final ImageView mButton; + private final FloatingActionButton mButton; private static final SparseArray mIcons = new SparseArray<>(); // Location mode -> Button icon private int mMode; @@ -30,7 +31,7 @@ public class MyPositionButton public MyPositionButton(@NonNull View button, @NonNull View.OnClickListener listener) { - mButton = (ImageView) button; + mButton = (FloatingActionButton) button; mVisible = UiUtils.isVisible(mButton); mButton.setOnClickListener(listener); mIcons.clear();