1、画虚线,实线:

建立dotted_line_gray.xml文件放在drawable文件夹下面。

android:shape="line" 可以修改你想要的形状

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

然后在布局的xml里面:
作为ImageView或者Linearlayout等作为背景源就可以了。
<LinearLayout
android: />
---------


2、画圆角矩形


建立 rect_gray.xml文件放在drawable文件夹下面。


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

android 画虚线、实线,画圆角矩形,一半圆角

3、一半圆角:

<shape xmlns:andro/> <!--下面右圆角的半径-->


<gradient android:startColor="#ffffff"
android:endColor="#ffffff"
android:angle="270"/>


<stroke android:width="1dp"
android:color="#80000000" />
</shape>

 

android 画虚线、实线,画圆角矩形,一半圆角

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-11-11
  • 2022-01-01
  • 2021-10-04
  • 2021-09-27
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2021-09-13
  • 2021-07-07
  • 2021-11-21
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案