Hi,
I have an Android app that display an image by specifying the height of the image view (so that the length will autosize). This works fine on SDK 3.1.3GA. But when the same app is run in 3.2.0GA the ImageView no longer autosizes. It behaves as though the width is set to Ti.UI.FILL and then positions the image in the middle.
I have created a very simple example by generating a new Alloy app and just adding the image to the index.xml (see below).
<Alloy> <Window class="container"> <ImageView class="stars" /> </Window> </Alloy>The associated tss entry is
".stars":{ image: '/images/stars40.png', height: '13dp', backgroundColor: 'pink' }The actual image dimensions are 71x13, the background is only set to pink to highlight the problem.
If run under 3.1.3GA it works as I would expect on both iOS and Android (the pink background only showing around the image which is centred), but in 3.2.0GA on Android although the image is still centred the pink background stretches the full width of the window..
Is this a problem with 3.2.0GA or is this a change that was meant. It does cause a problem as the app assumes that images are height specified only s that keep there aspect ratio, and although this is still the case the ImageView now auto fills the parent which causes layout problems elsewhere. I have run this code on both the Android Emulator, Genymotion emulator and on device and the results are the same when compiled with 3.2.0