Problem
Content in ScrollableView will not display If ScrollableView is inside a ScrollView.
Reproduce:
Simply run the following code.
var win = Titanium.UI.createWindow({
height: Ti.UI.Fill
});
var textView = Ti.UI.createView({
width: "97%",
top: "0",
left: "7",
touchEnabled:"false",
layout:'vertical'
});
var textArea = Ti.UI.createTextArea({
width:"100%",
value:"This policy provides at least the minimum amounts of liability insurance required by the Texas Motor Vehicle Safety Responsibility Act for the specified vehicles and named insureds and may provide coverage for other persons and other vehicles as provided by the insurance policy."
});
textView.add(textArea);
var scrollableView = Ti.UI.createScrollableView({
views:[textView],
backgroundColor: "#ffffff",
layout: "horizontal",
scrollingEnabled:"false",
touchEnabled:"false"
});
var scrollView = Titanium.UI.createScrollView({
width: "93%",
height: "85%",
layout: "vertical",
scrollType: "vertical",
scrollingEnabled: "true",
touchEnabled: "true"
});
scrollView.add(scrollableView);
win.add(scrollView);
win.open();
Expect Result:
The TextArea should display well.
Actual Result:
Nothing inside ScrollableView will display.
Note:
Problem only happens in SDK 3.5.*
It works well in SDK 3.4.1
Pull pending https://github.com/appcelerator/titanium_mobile/pull/6758
The problem is with the
layout:horizontal
property set on ScrollableView. Since scrollableView does not support adding children directly and only supports theviews
property, this property makes no sense and should be ignored. The Above PR does the sameClosing ticket as fixed.