关于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及以上

猜你喜欢

转载自www.cnblogs.com/yang12318/p/9095442.html