Android 5 0以上版本去掉Button自带阴影效果的方法

关键代码:

style=”?android:attr/borderlessButtonStyle” 
  • 1

参考文章:
http://stackoverflow.com/questions/28756035/how-to-remove-button-shadow-android

具体配置:

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:onClick="sendMessage"
style="?android:attr/borderlessButtonStyle" />
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

设置该属性就可以去掉自带的阴影。
该属性在API 11及以上可用。

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

猜你喜欢

转载自www.cnblogs.com/skiwnchhw/p/10349648.html
今日推荐