Yes, the ListView does automagically scroll as the number of items increase larger than the display area.
On Mon, Nov 7, 2011 at 6:07 AM, KK <[email protected]> wrote: > Thanks for the quick tip, I'll try it out. I've a question though. Is it the > case that the lisview inherently supports scrolling when the no of items > grows bigger than the display area, and hence we don't need to sue > scrollview in this case? If that is the case then, as per your suggestion, > in my case if the no of items is say 50 then they will automatically be > scrollable, right? Please rectify if I'm wrong. > Thanks, > kk > On Mon, Nov 7, 2011 at 12:25 AM, Dianne Hackborn <[email protected]> > wrote: >> >> Yes, you can, but you really should use a ListView instead of a ScrollView >> if you have a lot of items to show or the dynamically change. >> >> On the top view use android:layout_weight="1" and >> android:layout_height="0px" to tell it to grow to fill whatever space is >> available. >> On Sun, Nov 6, 2011 at 8:56 AM, KK <[email protected]> wrote: >>> >>> hi All, >>> I'm not sure if the asking I'm asking is logical or wrong. Actually I'm >>> trying to achieve something like this: >>> 1. The whole screen is divided into two parts, Upper half which takes 90% >>> of layout space and the lower half which is 10% of the space. >>> 2. In the lower half I'm showing the progress bar for each song selected >>> from the Upper half. >>> 3. In the upper half I'm trying to show all the songs in the sdcard >>> available. I'm trying to make this part scrollable as we can have lots of >>> song which wont fit in the given space. >>> I want the lower part to remain fixed irrespective of the current >>> selection in the Upper half, say for example if I'm playing the 50th >>> song(out of 100) then song will be in the middle of the Upper screen space >>> where as the lower half will continue to show the current song position. >>> Logically, I'm trying to do something like this in the layout file >>> >>> <LinearLayout> >>> <ScrollView> >>> layout_weight=9 >>> sldjfsldf >>> <listview> >>> song lsit >>> </listview> >>> ...... >>> </ScrollView> >>> <Seekbar> >>> layout_weight=1 >>> sdljfsldjf >>> </Seekbar> >>> </linearlayout> >>> >>> Please help me how to get this done. Would appreciate other ways of >>> achieving my end result by some other elegant approach. >>> Thanks in advance. >>> Regards, >>> KK >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >> >> >> -- >> Dianne Hackborn >> Android framework engineer >> [email protected] >> >> Note: please don't send private questions to me, as I don't have time to >> provide private support, and so won't reply to such e-mails. All such >> questions should be posted on public forums, where I and others can see and >> answer them. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

