Error: Android-XML:Placing a in a parent element that uses a wrap_content size can lead to subtle bugs; use match_parent

后端 未结 4 1322
夕颜
夕颜 2021-02-13 13:20

I am a beginner in Android and building a linear layout and getting an error in the layout XML file like this,

Error

 Placi         


        
4条回答
  •  -上瘾入骨i
    2021-02-13 13:46

    I had the same issue before, I had to set the height to 250dp, but I couldn't, so what I did was just wrap it into a FrameLayout and set the custom height to it, you can set the height you want to the wrapper (just not wrap_content) and it will work with no problem:

    
    
        
    
    
    

提交回复
热议问题