码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2019-02-03 10:53:41      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:targe   shadow   flow   配置   and   人工智能   .com   sha   方法   

关键代码:

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

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

标签:targe   shadow   flow   配置   and   人工智能   .com   sha   方法   

原文地址:https://www.cnblogs.com/skiwnchhw/p/10349648.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!