[TIMOB-1856] Android: Scrollview does not allow child view to use right:0 to specify full width
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect |
Reporter | Bill Dawson |
Assignee | Don Thorp |
Created | 2011-04-15T03:04:03.000+0000 |
Updated | 2011-04-17T01:57:21.000+0000 |
Description
Sample app.js:
Titanium.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
exitOnClose: true,
fullscreen: true,
backgroundColor: 'purple'
});
var sv = Ti.UI.createScrollView({
left: 0, right: 0, top: 0, height: 100,
backgroundColor: 'green'
});
var v = Ti.UI.createView({
left: 0, right: 0, top: 0, height: 50,
backgroundColor: 'red'
});
sv.add(v);
win.add(sv);
win.open();
You should see a smaller red view inside the green scrollview.
But you don't. If you change createView
argument
right:0
to width:100
it works.
Note that if the outer view is a standard View
instead of a ScrollView
, it works fine. So it seems to
be only happening with ScrollView
.
Assigned to Don for milestone/priority.
What's the expected setting of contentWidth in order to give you width of the ScrollView's content area?
(from [fae3442e85164bc616e31441fa5de28fb18e41fa]) [#987 state:fixed-in-qa][#1472 state:fixed-in-qa][#1856 state:fixed-in-qa][#863 state:fixed-in-qa] scroll view support vertical layout. Fixed other layout issues with scrollview. Note: #863 the KS test seems to have been changed to include top. I removed top and the label display as expected. http://github.com/appcelerator/titanium_mobile/commit/fae3442e85164bc616e31441fa5de28fb18e41fa"> http://github.com/appcelerator/titanium_mobile/commit/fae3442e85164...
1.4.2.4ce7ff G1 running 1.6, 2.2 simulator.