I want to use a kind of ListView inside of a ScrollView. The list has a variable length, it is always possible to add/remove items. Is there an easy way to modify the default Android ListView, oder do I have to create a custom ListView?
            Asked
            
        
        
            Active
            
        
            Viewed 8,439 times
        
    1
            
            
         
    
    
        Veaceslav Gaidarji
        
- 4,261
- 3
- 38
- 61
 
    
    
        JensJensen
        
- 1,017
- 1
- 12
- 25
- 
                    add a listview in a scrollview is bad practice.What you want to achieve ? – Biraj Zalavadia Nov 21 '13 at 09:03
- 
                    create views in between scrollview by using a forloop – Invader Nov 21 '13 at 09:03
- 
                    `ListView` is possible to add/remove items, and it can scroll by itself. So why do you want to have a new class that does the same thing? – Lawrence Choy Nov 21 '13 at 09:03
- 
                    Like others pointed out, this is very bad practice. Check out this answer by the creator of the listview widget and the discussion in the comments for more info: http://stackoverflow.com/a/3496042/362298 – Ricardo Nov 21 '13 at 09:26
- 
                    I have a quite big vertical layout, inside which I want to have, among others, a list of `TextView`s. Of course I can put a lot of single `TextView` inside my layout, but for me that seems not to be very practical too. – JensJensen Nov 21 '13 at 09:38
1 Answers
0
            
            
        The ListView should expand to fill as much vertical area as it needs when contained in a ScrollView so you shouldn't have a problem.
 
    
    
        TechDragon
        
- 149
- 1
- 7