關於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