I have a LinearLayout with width set to fill_parent and height to wrap_content. Now I want to give it a background from a png file, but doing it in a traditional way causes the LinearLayout to resize in order to show the whole background instead of cropping the additional part.
How can I set the background of LinearLayout so it won’t resize?
Thanks
It appears that such thing is achievable only using the
ImageViewand setting thescaleTypeparameter accordingly. A quick workaround is to useFrameLayoutand put theImageViewunder another layout with transparent background.Code: