I have multiple drawables and want to combine it to one drawable (for example, 4 squares to create one big square, like Windows logo :)). How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do that using a
TableLayoutor someLinearLayouts. However, if what you want is to create a single image to usin within aImageViewyou will have to create aBitmapmanually; it is not hard:I have not even compile the code above; I’m just showing you how it can be done. I’m also assuming you have square drawables all with the same dimensions. Notice that the bitmap called
bigcan be used wherever you want (e.g.ImageView.setImageBitmap()).