代码如下:

 

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro>
    android:shape="rectangle">

    <!-- 填充的颜色:这里设置背景透明 -->
    <solid android:color="#25000000" />
    <!-- 边框的颜色 :不能和窗口背景色一样 -->

    <!-- 设置按钮的四个角为弧形 -->
    <!-- android:radius 弧形的半径 -->
    <corners
        android:bottomLeftRadius="10dp"
        android:bottomRightRadius="10dp"
        android:topLeftRadius="0dp"
        android:topRightRadius="0dp" />

    <!-- padding:Button里面的文字与Button边界的间隔 -->
    <padding
        android:bottom="10dp"
        android:left="10dp"
        android:right="10dp"
        android:top="10dp" />

</shape>

 

相关文章:

  • 2021-10-10
  • 2022-01-08
  • 2021-07-25
  • 2022-12-23
  • 2021-12-04
  • 2021-12-21
  • 2021-12-14
猜你喜欢
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案