I have a pattern (.png image 4x4px) and have to fill the layout with it.
Does anyone know how to do this?
If I simply select the drawable as a background the image, it is stretched; instead it needs to be repeated along the x and y axis.
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.
Here is a really nice explanation:
Put your “back.png” image on “drawable” folder. Then create a drawable “backrepeat.xml” like that:
In your layout, add
android:background="@drawable/backrepeat":As is the case with many Android good practices/handy tricks, it can be traced back to Romain Guy.