I want to make avatars in my app customizable, where the user selects different parts from each category to form the final avatar, from which I can save a copy of as an image.
So let's say I have drawables fot the hair, the head shape, the skin tone, clothing, and accessories already. What's the best approach to do this? I have 2 ideas, but I don't know which one is more practical.
1) layer the different drawables on top of each other, create a new image from them, save the image to storage. But with this approach, I have no clue how I would even start it
2) To have each item indexed in an array. So let's say head shapes of different skin tones would be indexed "hw_1-hw_n" and "hb_1-hb_n" for example. Then basically after the user chooses the items, I'd store a new array with the indexes such as ["tb_5","hb_3","c_23","a_24"], then retrieve each drawable using its index when the user pulls up the image. But I think this approach is to expensive to implement.
So any help with ideas and pointers would be greatly appreciated, and thank you for answering my first question on SO!
No comments:
Post a Comment