ListView inside scroll view magic

后端 未结 3 721
北海茫月
北海茫月 2021-01-21 03:32

For my app I want to enable a thing looking somehow like this:


    
        

        
3条回答
  •  有刺的猬
    2021-01-21 03:47

    in Layaout set Parameter

     
    
          
          
    
    

    And in the Coding Part Set the Dynamic height of listview according to device height

        LayoutParams lp = (LayoutParams) list1.getLayoutParams();
        int height = (arraylist.size()) * 80; 
    
            //arraylist list is in which all data is kept
    
        lp.height = height;
        listview.setLayoutParams(lp);
    
        listview.setAdapter(Adapter);
    

提交回复
热议问题