I have a set of Buttons (not ImageButtons) declared in xml. They contain a background image. I want to be able to dictate the width of the Button via xml, via the use of weight... but I want to let the height to be dictated by the aspect ratio of the image.
I saw a similar question here, to which the answer involved the addition of android:adjustViewBounds="true" but the question concerned ImageViews rather than Buttons and when I tried the same additions to my Button code, it didn't appear to work.
Can what I want be achieved?