1、在您的android工程的res目录下的drawable建立xml配置文件button_shape.xml
2、在button_shape.xml按照您自己的需求写入如图所示的属性
3、在button按钮的属性中,设置android:background="@drawable/button_shape",这样就使用了刚刚我们自定义的button_shape.xml资源
时间:2024-10-15 12:33:58
1、在您的android工程的res目录下的drawable建立xml配置文件button_shape.xml
2、在button_shape.xml按照您自己的需求写入如图所示的属性
3、在button按钮的属性中,设置android:background="@drawable/button_shape",这样就使用了刚刚我们自定义的button_shape.xml资源