Android一些常用的背景图


Android中一些常用的xml背景图

1、绿色背景 圆角为4dp的xml背景(颜色可自行修改)

res/drawable 目录下 common_bg_4_radius_green.xml


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">

  <solid android:color="@color/绿色"/>
  <corners android:radius="4dp"/>
</shape>

2、绿色border边框背景

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<stroke
  android:width="0.6dp"
  android:color="@color/绿色" />
<corners android:radius="2dp" />

</shape>

3、背景为圆形

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="oval">

  <solid android:color="@color/绿色" />
  <corners android:radius="8.3dp" />

  <size
    android:width="17dp"
    android:height="17dp" />
</shape>


文章作者: 李文洋
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 李文洋 !
评论
 上一篇
搭建服务器ubuntu系统 搭建服务器ubuntu系统
购买完服务器后应该做哪些配置一 、安装apachesudo apt-get install apche2 apche2-doc 如果你已经安装完了nginx,你需要安装一个这个东西,当你在浏览器地址栏输入服务器公网ip的时候就会出现一个ng
2020-12-30
下一篇 
Android自定义EditText一键清除和密文查看 Android自定义EditText一键清除和密文查看
Android自定义EditText一键清除和密文查看 先上截屏看一下效果 自定义步骤1、首先新建一个类PowerfulEditText.java 我放在了widgets目录中这个目录平时就用来存放一些自定义的类 // 这个自定义Edi
2020-12-18
  目录