How to implement a material design circular progress bar in android

前端 未结 8 855
小鲜肉
小鲜肉 2020-12-07 15:35

I want to make a material design circular progress bar like the one in Inbox by Gmail android app. How do I achieve this (in pre-lollipop devices)?

Am trying to achie

8条回答
  •  春和景丽
    2020-12-07 16:03

    Was looking for a way to do this using simple xml, but couldn't find any helpful answers, so came up with this.

    This works on pre-lollipop versions too, and is pretty close to the material design progress bar. You just need to use this drawable as the indeterminate drawable in the ProgressBar layout.

    
    
        
            
                
                    
    
                        
                    
                
            
            
                
                    
                        
                    
                
            
        
    
    

    set the above drawable in ProgressBar as follows:

      android:indeterminatedrawable="@drawable/above_drawable"
    

提交回复
热议问题