How to set 9-patch background for ViewPager, that will put the pages inside, and keep aspect ratio?
问题 Background I have a ViewPager (of images pages), which needs to show its content inside an image that should keep its aspect ratio. The problem Problem is, when I just set a 9-patch for any kind of ViewGroup (including the ViewPager), the image just stretches (not keeping the aspect-ratio), and for some reason, it doesn't even respect the content bounding box I've set to it (in the 9-patch). It occurs even if I put the ViewPager in a FrameLayout that has the 9-patch background instead. What I