Salve a tutti,
vorrei creare un'app di abbinamento colori dei vestiti; quindi è possibile scegliere un colore da una palette e riempire l'oggetto?
Saluti
Nicola
How you might do this will depend on your image assets.
As you show them in your images above, you could use a canvas (and use @Juan_Antonio 's floodfill extension)
Alternatively, if your line drawing images are transparent png files, you could place a button inside an arrangement, set the image to the button, set the colour to the arrangement.
Works OK for me...(Android 12)
- Check your file paths
- make sure you are working with a file in a writeable location (copy a file from assets to ASD)
- May be better to try an image with a white background, instead of transparent
- Reload the canvasbackground after you have changed a colour.
You may get some help from my Paint
app.
It has everything you might need.
-
Choose a colour from the pallete. It will then be set as the background colour of an arrangement, to show which colour is currently selected.
-
A fill option to change the background colour of the canvas.
-
An ImagePicker option to set an image above the background color. Use a transparent image for what you want. I haven't sorted out the canvas size issues though. It works properly for a square image.
AIA : Paint.aia (263.1 KB)
@TIMAI2 ho copiato le 3 immagini in ASD e poi ho provveduto a creare il file APK; ma l'app non si avvia