关于button去掉自带阴影效果的方法


在button的属性设置里加上:

style=”?android:attr/borderlessButtonStyle” 

即:

 1   <Button
 2       android:layout_width="fill_parent"
 3       android:layout_height="50dp"
 4       android:layout_marginTop="20dp"
 5       android:gravity="center"
 6       android:layout_marginLeft="20dp"
 7       android:layout_marginRight="20dp"
 8       android:textSize="15sp"
 9       android:textColor="#50000000"
10       style="?android:attr/borderlessButtonStyle" />

此方法适用于API11及以上


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM