Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 148
Registered: ‎10-30-2010
My Device: Bold 9930
My Carrier: Verizon

ListView within a ScrollView

I have a layout where there is a SegmentedControl that allows the user to toggle between a TextArea of information and a ListView of data.

 

The TextArea correctly allows the whole page to scroll right to the bottom of the end of the text. However, the ListView just scrolls downwards forever with a blank screen after the list items.

 

Is this a bug? Or is there a way to fix it? I tried different combinations of adjustments in height and nesting for various components with no use.

 

Thanks

Developer
Posts: 148
Registered: ‎10-30-2010
My Device: Bold 9930
My Carrier: Verizon

Re: ListView within a ScrollView

I guess I didn't try enough adjustments with the ListView height because I finally figured it out with the min/max/pref height together. That's the solution.

Developer
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: ListView within a ScrollView

Ideally you shouldnt have a listview inside a scroll view. Thats just asking for weird behavior. Is there a reason you cant have them separate in this case? Is it cause you want the SegmentedControl to scroll off the screen too?
Like all of my posts
Developer
Posts: 148
Registered: ‎10-30-2010
My Device: Bold 9930
My Carrier: Verizon

Re: ListView within a ScrollView

Yes. I want everything to scroll off the screen uniformly. Before, I had the SegmentedControl options (TextArea and ListView) scroll independently while the screen stays stationary. Does that make sense?