Search code examples
androidappceleratorappcelerator-titaniumappcelerator-alloy

Titanium - ScrollableView height on Android


I have a problem with the height of a scrollableView on Android.

I don't know what width and height have got the photos but I want that the width of the photo fill the screen so, width: Ti.UI.FILL, and the height be proportional. But the result is that the scrollableView fills the width but the photo is very very small in the center of the scrollable view. I need to maintain the proportionality of the image.

On iOS works perfectly, but on Android it's impossible,

I have a tableViewRow with a scrollableView inside:

        <TableViewRow id="sliderRow" height="Ti.UI.SIZE" width="Ti.UI.FILL">
                <ScrollableView id="slider" showPagingControl="true"></ScrollableView>
        </TableViewRow>

The tss of the slider is:

"#slider":{
    height: Titanium.UI.SIZE,
    width: Titanium.UI.FILL,
    top: 2,
    right: 2,
    left: 2
}

The code of the images that I add to the scrollableView:

    var image = Ti.UI.createImageView({
        id: ('image' + i),
        image: (raiz + path),
        height: Ti.UI.SIZE,
        width: Ti.UI.FILL,
        defaultImage: "/images/Principal/imagen_carga.png"  
    });

Solution

  • This is a know parity bug, reported under:

    https://jira.appcelerator.org/browse/TIMOB-16878