Android RelativeLayout : how to alignParentBottom when wrapped in a ScrollView?

后端 未结 5 835
情话喂你
情话喂你 2020-12-05 13:31

The problem I am having seems to be that if I have a view (e.g. myButton) inside a RelativeLayout set to alignParentBottom - (as per the code below) - and then wrap the Rela

5条回答
  •  無奈伤痛
    2020-12-05 13:38

    Take the button out of the SCrollview, Wrap both the Scrollview and the Button in a Linear Layout, set the scrollview's height to 0dip and set it's weight to 1, do not set any weight property for the button, so the scrollview can occupy all the remaining space saving only the button's space way at the bottom.

    
    
    
        
            
    
            ....lots of views...
    
    
            
        
    
        

提交回复
热议问题