Android background hides child view text

前端 未结 1 1654
有刺的猬
有刺的猬 2021-01-16 11:56

I have a simple LinearLayout. When I add the android:background to the LinearLayout, the TextView is no longer visible.

What am I

1条回答
  •  一向
    一向 (楼主)
    2021-01-16 12:22

    It seems that LinearLayouts with backgrounds expand wierdly. I just used a Framelayout to create a header. Here's the XML if anyone wants I. It takes an ImageView that points to a NinePatched background and stretches it.

    
    
    
    
    
         
         
    
        
    
                 
                   
        
    
    
     
    
    
    

    0 讨论(0)
提交回复
热议问题