Custom Drawable for ProgressBar/ProgressDialog

后端 未结 8 1096
野性不改
野性不改 2020-11-22 10:33

Reading the limited documentation that Google has provided, I get the feeling that it is possible to change the look (drawable) of a ProgressBar/ProgressDialog by simply cre

8条回答
  •  一整个雨季
    2020-11-22 10:56

    I used the following for creating a custom progress bar.

    File res/drawable/progress_bar_states.xml declares the colors of the different states:

    
    
        
            
                
            
        
    
        
            
                
                    
                
            
        
    
        
            
                
                    
                
            
        
    
    
    

    And the code inside your layout xml:

    
    
    

    Enjoy!

提交回复
热议问题