Removing the shadow on an android button

后端 未结 4 1734
我在风中等你
我在风中等你 2021-02-07 04:42

I have searched and tryed all found solutions to this. I need to remove the shadow from a button in android. Most of the solutions i found involve using an imagebutton and setti

相关标签:
4条回答
  • 2021-02-07 05:22

    In my case, simply adding..

    android:shadowRadius="0"
    

    ..in the xml file did the trick.

    0 讨论(0)
  • 2021-02-07 05:24

    How about

            <Button
               ..<code>
    
                android:stateListAnimator="@null"
    
               ..<code>
           </Button>
    
    0 讨论(0)
  • 2021-02-07 05:42

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

    0 讨论(0)
  • 2021-02-07 05:44

    Set Style Attribute for Button in xml

    style="?android:attr/borderlessButtonStyle"
    

    It Works.

    0 讨论(0)
提交回复
热议问题