How to align ImageView to the bottom, fill its width and height, and keep its aspect ratio?

后端 未结 6 1945
攒了一身酷
攒了一身酷 2021-02-05 11:36

Background

There are various XML attributes for ImageView to scale its content , and various layout views that allow to place views and set their sizes.

Howeve

6条回答
  •  醉梦人生
    2021-02-05 12:36

    Fist of all, I don't really understand what you really want for align image to the bottom from what I read your layout. My layout will make the image center, and scale you can modify the high of the bottom view to see how image will look like. Change the high of the top or bottom view the image size will scale up or down depend on the space available for imageView.

    
    
    
        
    
    
        
    
            
        
    
        
    
    

    Hope this will fix your problem.

提交回复
热议问题