在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及以上

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-07-31
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案