Come creare un cerchio disegnato?
-
15-11-2019 - |
Domanda
Come creare un drawable
di un cerchio, con un colpo blu di 5 pixel e un riempimento trasparente.
Passerò questo drawable
a un ItemizedOverlay
.
Voglio farlo con il codice e conosterò il raggio del cerchio.
Soluzione
Try something along the lines of:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
type="OvalShape" >
<stroke android:width="5dp" android:color="#99104E8B"/>
....
</shape>
Just put something like this in an XML file in you drawables directory and load it as you would a normal image.
See ShapeDrawable in the Android Docs.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow