How to set a background for whole application in Android?

前端 未结 2 2140
旧时难觅i
旧时难觅i 2021-02-19 19:35

In my application I have a lot of layers and instead of setting a background image to each of them, I want to set a background once and for all. How can I do that?

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-19 20:15

    Add android:windowBackground to your theme:

    
    
    

    And of course make sure your manifest uses the theme for you application:

    
    
    
        
    
            
                
                    
                    
                
            
    
        
    
    
    

提交回复
热议问题