dimanche 7 août 2022

Android Studio - Drawing / Creating shapes (dynamically?)

fledgling here, asking my very first question on Stack Overflow :)

Question: I'd like to create a shape with number of points according to the user's input. For example, if a user inputs 5, I'd like to come up with a pentagon. How should I approach this?

What I have in mind: diagrams that show various stats of an object, similar to how you may see a soccer player's traits in a game: Speed, Stamina, Shooting accuracy, etc. However, I want the users to decide what traits they want to have in their diagram. Eventually I'd like to display the changes in those trait values to reflect improvement / worsening of each values.

So far, I've found out that drawables are usually for static images..? And some dynamic image generation may be very (resource) demanding.. Since it's kind of a graph.. maybe there's something out there that I could use? (But I want to make it look pretty and not nerdy looking graph)

I'm trying to do this on Android Studio, and I've never used Kotlin so I'm trying to stick to Java if that's relevant ;-;.. Any help would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire