[TIMOB-1472] Android: Vertical Layout Collapses To Empty
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect |
Reporter | Don Thorp |
Assignee | Marshall Culpepper |
Created | 2011-04-15T02:53:45.000+0000 |
Updated | 2011-04-17T01:56:16.000+0000 |
Description
See http://developer.appcelerator.com/helpdesk/view/30521">Helpdesk 30521 for example. Basically in a Window, Labels added as children don't draw, collapse to zero, or some other issue. Side-effect is empty window.
Attachments
File | Date | Size |
---|---|---|
screen_label.png | 2011-04-15T02:53:45.000+0000 | 157826 |
Is there any new status on that ticket?
Would really need to have this feature for horizontal layout.
Im getting a list of values from a xml file of our client.
So i dont really know the width/sizes of the lables im creating of this values and so i cant
get a good horizontal scrolling bar at the top :-(
I'm having the same issue when setting vertical layout to a scrollview window is empty (scrollbar appears with the correct height) setting a layout to a view renders a correct view :
var win = Titanium.UI.currentWindow;
var scrollview = Titanium.UI.createScrollView({contentWidth:'auto',contentHeight:'auto',top:0,showVerticalScrollIndicator:true,showHorizontalScrollIndicator:true});
var sview = Titanium.UI.createView({layout:'vertical',contentWidth:320,contentHeight:'auto'});
var win_titre = Titanium.UI.createLabel({text:'TITLE', backgroundColor:'#09205F', width:'auto', height:'auto',font:{fontSize:14}, color:'#fff',top:0,left:0, visible:true});
var win_description = Titanium.UI.createLabel({text:'MAIN LONG TEXT', height:'auto',width:'auto',font:{fontSize:12}, top:5,left:0});
sview.add(win_titre);
sview.add(win_description);
scrollview.add(sview);
win.add(scrollview);
I have just discovered that using
var sview = Ti.UI.createView({width:'auto',height:'auto',top:0,layout:'vertical'});
instead of
var sview = Titanium.UI.createView({contentWidth:'auto',contentHeight:'auto',layout:'vertical'});
make the whole view appear in the scrollView (cool)
(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...
Still not working for me with a horizontal layout
All Lables are put on top of each other label.
1.4.2.4ce7ff G1 running 1.6, 2.2 simulator, using original provided code snippet.
Marco, the code as provided won't run. If you still encounter the issue using todays pull, please log a new helpdesk ticket.
I'm sure the fix is fine - if it does not work, can't it simply be reopened?
Bearing in mind that those people for whom this issue is particularly crucial are presumably watching this ticket, it would be a real flaw in the ticketing system if the issue was duplicated elsewhere, leaving everyone completely unaware.
OK, observing what happened after my previous post, it seems that the conversation can still continue in this ticket, and at least everyone receives an emailed update. If this is truly the case, then that will be fine.