Hey Eric -

While you can manage what your trying to do it gets pretty nasty. The best 
practice approach for this is using a TableView and TableViewRows.

Remember that the TableViewRow is an inherited class from a regular View. This 
means that you can add pretty much whatever you want to it - it does have 
specific child objects, but if you ignore them, they end up null and don't 
display. In your case, you simply want to create the TableViewRow with a 
horizontal layout and then just add what ever views you want to it.

Check out the example code I put together here: 

https://gist.github.com/3035526

Hope this helps you out with your problem.

Bert Grantges
Appcelerator Certified Developer, Titan,  and Employee :)


On Jul 2, 2012, at 11:35 AM, EHM wrote:

> Hi all, this is my first time posting so thanks in advance.  I am working 
> with appcelerator Titanium on my first mobile development project for iPaid 
> and i was hoping that there was someone out there with with a little more 
> experience to help point me in the right direction on some scrollView issues 
> i'm having.  I'll be brief:
> 
> I'm trying to setup a scrollView that displays child views in a horizontal 
> layout, but that scrolls vertically.  Almost exactly like the youTube app for 
> ipad if you click on 'most viewed' or 'top rated'.  my problem is that i have 
> to set a fixed height for the scrollView, as it doesn't seem to want to 
> absorb the contentHeight automatically from the child views if the layout is 
> set to 'horizontal'.  i've tried to get around this by having the scrollView 
> set to vertical, and then adding a containing view for the children, but that 
> doesn't work either.  
> 
> if anybody has any thoughts on this it would be greatly greatly appreciated.  
> I'd also love to find some other titanium developers in the area as i think 
> it's a really wonderful tool.  here is a sample of my code:
> 
>     var win = Ti.UI.createWindow({
>         layout:'vertical',
>         height:'auto'
>     }); 
> 
>     var scrollView = Ti.UI.createScrollView({
>         top:0,
>         left:0,
>         height:'auto',
>         width:'auto',
>         contentHeight:'auto',
>         contentWidth:'auto',
>         layout:'horizontal',
>         showHorizontalScrollIndicator:false,
>         showVerticalScrollIndicator:true
>     });
>     win.add(scrollView);
> 
>     var view = Ti.UI.createView({
>         top:0,
>         left:0,
>         height:330,
>         width:256,
>         backgroundColor:'#f1f1f1'
>     });
>     scrollView.add(view);
> 
> -- 
> Our Web site: http://www.RefreshAustin.org/
>  
> You received this message because you are subscribed to the Google Groups 
> "Refresh Austin" group.
>  
> [ Posting ]
> To post to this group, send email to [email protected]
> Job-related postings should follow http://tr.im/refreshaustinjobspolicy
> We do not accept job posts from recruiters.
>  
> [ Unsubscribe ]
> To unsubscribe from this group, send email to 
> [email protected]
>  
> [ More Info ]
> For more options, visit this group at 
> http://groups.google.com/group/Refresh-Austin

-- 
Our Web site: http://www.RefreshAustin.org/

You received this message because you are subscribed to the Google Groups 
"Refresh Austin" group.

[ Posting ]
To post to this group, send email to [email protected]
Job-related postings should follow http://tr.im/refreshaustinjobspolicy
We do not accept job posts from recruiters.

[ Unsubscribe ]
To unsubscribe from this group, send email to 
[email protected]

[ More Info ]
For more options, visit this group at 
http://groups.google.com/group/Refresh-Austin

Reply via email to