How can I add the new “Floating Action Button” between two widgets/layouts

前端 未结 10 2016
离开以前
离开以前 2020-11-22 10:31

I guess you have seen the new Android design guidelines, with the new \"Floating Action Button\" a.k.a \"FAB\"

For instance this pink button:

10条回答
  •  盖世英雄少女心
    2020-11-22 10:35

    Keep it Simple Adding Floating Action Button using TextView by giving rounded xml background. - Add compile com.android.support:design:23.1.1 to gradle file

    • Use CoordinatorLayout as root view.
    • Before Ending the CoordinatorLayout introduce a textView.
    • Inside Drawable draw a circle.

    Circle Xml is

    
    
    
        
        
    
    

    Layout xml is

    
    
    
    
    
    
        
            
    
        
    
            
                
    
            
                
    
                
    
                
    
    
    
            
                
    
                
    
            
    
    
    
            
                
    
                
    
            
    
    
            
                
    
                
    
            
    
        
    
    
    
    
        
    
            
    

    Click here to se how it Will look like

提交回复
热议问题