Create a CardView with a semicircle on top

后端 未结 3 2268
心在旅途
心在旅途 2021-02-11 08:37

I am very much into designing a login screen.

Something like this:
How Do I actually cut the card from the top so as to fill the drawable on top of it? Any help w

3条回答
  •  忘掉有多难
    2021-02-11 09:12

    A bit update from Ferdous Ahamed's answer. you need to make your image circular.

    just add this to your gradle

    compile 'de.hdodenhof:circleimageview:2.2.0'
    

    then in your xml

    
    
    
    
        
    
            
    
                
    
                    
    
                    
    
                    

    all you need to do is use same color. in your parent background and in your imageview use same color for border.

    app:civ_border_color="#f36121"
    

    OUTPUT

    Refer Github link.

提交回复
热议问题