How to remove button shadow (android)

前端 未结 10 1987
失恋的感觉
失恋的感觉 2020-12-07 11:16

I want to remove the shadow from the button to make it seem more flat.

I have this right now:

\"cancel

10条回答
  •  萌比男神i
    2020-12-07 11:41

    the @Alt-Cat answer work for me!

    R.attr.borderlessButtonStyle doesn't contain shadow.

    and the document of button is great.

    Also, you can set this style on your custom button, in second constructor.

        public CustomButton(Context context, AttributeSet attrs) {
            this(context, attrs, R.attr.borderlessButtonStyle);
        }
    

提交回复
热议问题