Removing the shadow on an android button

ε祈祈猫儿з 提交于 2019-12-03 05:01:23

How about

        <Button
           ..<code>

            android:stateListAnimator="@null"

           ..<code>
       </Button>

In my case, simply adding..

android:shadowRadius="0"

..in the xml file did the trick.

Alternative for Attribute stateListAnimator used in API level 21 - I wrapped button inside a linear layout, both having same dimensions. Worked for my case.

Set Style Attribute for Button in xml

style="?android:attr/borderlessButtonStyle"

It Works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!