From 1bbf8d0c5c7466f8dc5d2d40a377ff1cf6632c2a Mon Sep 17 00:00:00 2001 From: "Daniele Verducci (Slimpenguin)" Date: Wed, 28 Feb 2024 13:59:05 +0100 Subject: [PATCH] Changed position icon --- .../fragments/GeofavoriteMapFragment.java | 8 ++++++++ app/src/main/res/mipmap-hdpi/ic_person.png | Bin 0 -> 1200 bytes app/src/main/res/mipmap-mdpi/ic_person.png | Bin 0 -> 962 bytes app/src/main/res/mipmap-xhdpi/ic_person.png | Bin 0 -> 1540 bytes app/src/main/res/mipmap-xxhdpi/ic_person.png | Bin 0 -> 2214 bytes app/src/main/res/mipmap-xxxhdpi/ic_person.png | Bin 0 -> 2361 bytes 6 files changed, 8 insertions(+) create mode 100644 app/src/main/res/mipmap-hdpi/ic_person.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_person.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_person.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_person.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_person.png diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java index c2375b6..5e3f315 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java @@ -3,6 +3,8 @@ package it.danieleverducci.nextcloudmaps.fragments; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; +import android.graphics.Bitmap; +import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; @@ -15,6 +17,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.content.res.AppCompatResources; import androidx.core.app.ActivityCompat; +import androidx.core.content.res.ResourcesCompat; import androidx.core.graphics.drawable.DrawableCompat; import androidx.lifecycle.Observer; @@ -161,6 +164,11 @@ public class GeofavoriteMapFragment extends GeofavoritesFragment implements Main // Display user position on screen mLocationOverlay = new MyLocationNewOverlay(new GpsMyLocationProvider(requireContext()), map); + Bitmap personIcon = ((BitmapDrawable)AppCompatResources.getDrawable(requireContext(), R.mipmap.ic_person)).getBitmap(); + mLocationOverlay.setPersonIcon(personIcon); + mLocationOverlay.setDirectionIcon(personIcon); + mLocationOverlay.setPersonAnchor(.5f, .5f); + mLocationOverlay.setDirectionAnchor(.5f, .5f); // On first gps fix, show "center to my position" icon mLocationOverlay.runOnFirstFix(() -> { if(getActivity() != null) { diff --git a/app/src/main/res/mipmap-hdpi/ic_person.png b/app/src/main/res/mipmap-hdpi/ic_person.png new file mode 100644 index 0000000000000000000000000000000000000000..a8eb2b8b19460e948d079e384c09e11bd9a341ec GIT binary patch literal 1200 zcmV;h1W)^kP)EX>4Tx04R}tkv&MmKpe$iQ;S6^4t5afkfA!+MMWHI6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0HIZ5n$?#CG~G6{ z>6Dl+tcv}w5D-HcA;e^68FP}9f$#XbM}V()37+MD?$0r(7A*z@MB*efOq+OvcxKZ! zIPVijSw&Wf&xt2Yx*+i**Axar3t8Gv`S?d&zeFyDTvae~ zET9ezvg-%`gWug+rKw3TDUt$0FOKsu2K4U&?WW^=A3IL_1PDF@S9;f9ZvnHPq&K@- z{0JD@1}?6yxuzdIDG(e)K%sNI5-5x z%apzD^X_nOZ~va@^!Ec#IC7Y79LhZa000JJOGiWi{{a60|De66lK=n!32;bRa{vG? zBLDy{BLR4&KXw2B00(qQO+^Rj0vrh?G>}@C)c^nh8FWQhbVF}#ZDnqB07G(RVRU6= zAa`kWXdp*PO;A^X4i^9b0*OgPK~#9!?b$I%8&Lqp@&8LA$YC-x!jVOUK;q!$(8bL) zj)H6J&^bdD+M#5qU^`^)V7pp6n$^vvgIk9-5D=Ge;B_#12qt+Qypz~MHEK`p`u(;e z;mh5ZmwWeKKtx1DL_|bHL_|bHL?r#pV}7``b`DqumVkM{4PWwrZ@?a~YmE8+Uwtdq z+OoCwv$gij-s~)VZ#nfN$XaWFXTUq42rw90y2k;B-YGv%F93KlHNmVqMQPe0o4Gng zA6N%I8Dnhf3JS}43A_bz{lSofw$Ju{mmTk%-fx$jH?ZnXvbI=ap;9E5%>eX)*TDO@ zN{X|f=fDRb*9$IawmNLJPY7-zBtq%RcknsMs8OMod zVi-MhKn>ua?X%TBxpUT5`-FqGA05`h?8J|tWxyE>E!+Fu8}B)P6Ij^Z?=l!#04K~& zd_hY9-Q$2A@BH3jJKj0n>XD_oxvy)zs3tT+}K7^4hH!ZVR zV#QIA7cCzi%1D-%hJwBU%(_$LAKrYB zuK+)n%}}qEsn0lL2h?XA>a}vT?cs-+shGtGSKaGCKkrP?SgF#e7H;)(a||@9h0&FK zA6SoLB_H>GkT%S2SyH05Tpxut?Z?|I(%(KJA|fIpA|fIpA|fIpkL(x3u2n3cpzXE* O0000rBc literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-mdpi/ic_person.png b/app/src/main/res/mipmap-mdpi/ic_person.png new file mode 100644 index 0000000000000000000000000000000000000000..e37f130130ecee1f6988a9d80b7337f7950acbd3 GIT binary patch literal 962 zcmV;z13mnSP)EX>4Tx04R}tkv&MmKpe$iQ;S6^4t5afkfA!+MMWHI6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0HIZ5n$?#CG~G6{ z>6Dl+tcv}w5D-HcA;e^68FP}9f$#XbM}V()37+MD?$0r(7A*z@MB*efOq+OvcxKZ! zIPVijSw&Wf&xt2Yx*+i**Axar3t8Gv`S?d&zeFyDTvae~ zET9ezvg-%`gWug+rKw3TDUt$0FOKsu2K4U&?WW^=A3IL_1PDF@S9;f9ZvnHPq&K@- z{0JD@1}?6yxuzdIDG(e)K%sNI5-5x z%apzD^X_nOZ~va@^!Ec#IC7Y79LhZa000JJOGiWi{{a60|De66lK=n!32;bRa{vG? zBLDy{BLR4&KXw2B00(qQO+^Rj0vrh@9~a9#RsaA18FWQhbVF}#ZDnqB07G(RVRU6= zAa`kWXdp*PO;A^X4i^9b0h>ugK~!ko?bg3b8(|#B@%M9N2thar94`4WHd~i0T`UAg z!O1a;gXAwNsY8~GPC`cs)TK*16c=?6VlpU)Aptp3Ozz|0Ssb)RJjhAEFSzCIdG7oD zz;pLJV2m-w7-NhvDUjqO)g^tAbSCLfa-Ajj>XKYmn_rRiRnqNz9_#Wt(((C7$LAwm zUPqeGV@bMA#;l}O*QM1wZ~!z;E+({l1G>YAk?x-t9W+Y?T8%QbiVx5Oww!Y}OAnAN zi8iqN{r45y-};2{(_;e<_BX41{76$n=I z0Ebx!(D6JsYcwe%rvLx|07*qoM6N<$g6xE$LjV8( literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-xhdpi/ic_person.png b/app/src/main/res/mipmap-xhdpi/ic_person.png new file mode 100644 index 0000000000000000000000000000000000000000..4d7bd41705d44343baba9c5706a9d44b188d8ded GIT binary patch literal 1540 zcmZvcdpy&77{`AzHrH`Z=GI8&5OPZ~lZsh08VHaosI^e*d}gZjP@v)Z0!;2*k$6xKr-@Dq<-6_0eKx zZc(?ir~;teGo*N&A$fS#vS~5D$n;6hk9s8~jN1Ob&@gp!UVfV3TRV=~e zSF0F9Bpu%ATAaE^%b!TDmnvPZM^Pqk~WAt&Ltcqm4o3N37GnD`;PvhQ45 zR)JO++ylwd%l)I+W!ru(q+neoymlg}H0g`#$(-+lhbALl-hQc5sBL#89rC!k`((OT zsj{5!lyy)bu@}1Z_>M0%|wJs^h z#Pd1y4k`tR8}nR%piq)8hw?jD)>mSpqeZO6jV-V%Dy}FBF=#8M0y*c5a{xrUQP%nB zu2_+Yar7kvfC+LpL9_?QqLi5<$(uyjLCrs=$%We*0 zPG`fgI+~U7AL;1Bn5>Ee?pZ=rE|N$u2WuK$g+-z*9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