Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20460] Windows: ScrollableView does not respect `top` property on views

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2016-02-25T12:16:03.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2016-02-25T10:12:53.000+0000
Updated2016-02-25T12:16:03.000+0000

Description

ScrollableView should respect top property on child views.
var win = Ti.UI.createWindow({
    backgroundColor: "#7B6700",
    layout: "vertical"
});
var NavBarView = Ti.UI.createView({
    height: "25",
    top: 0,
    backgroundColor: "green",
    width: "100%"
});
var scrollView = Ti.UI.createScrollableView({
    height: '50%',
    width: Ti.UI.FILL,
    scrollType: "vertical",
    layout: "vertical",
    backgroundColor: "gray"
});
var view1 = Ti.UI.createView({
    backgroundColor:'white',
    top: 20, left: 20
});
var button = Ti.UI.createButton({
    title: "Click",
    width: "100",
    height: "50",
    backgroundColor: 'blue',
    top: 20, left: 20
});
view1.add(button);
scrollView.views = [ view1 ];
win.add(NavBarView);
win.add(scrollView);
scrollView.addEventListener("postlayout", function (e) {
    Ti.API.info(JSON.stringify(button.rect));
});
win.open();

Comments

  1. Kota Iguchi 2016-02-25

    This issue actually does not happen. Closing.

JSON Source