在使用AS的时候要注意以下几点:

  • 1.点9图不能放在mipmap目录下,而需要放在drawable目录下!
  • 2.AS中的.9图,必须要有黑线,不然编译都不会通过

xml定义NinePatchDrawable:

<!--pic9.xml-->
<!--参数依次为:引用的.9图片,是否对位图进行抖动处理-->
<?xml version="1.0" encoding="utf-8"?>
<nine-patch
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/dule_pic"
android:dither="true"/>

使用Bitmap包装.9图片:

<!--pic9.xml-->
<!--参数依次为:引用的.9图片,是否对位图进行抖动处理-->
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/dule_pic"
android:dither="true"/>

最新文章

  1. CSS 布局
  2. Paket 介绍
  3. FT部署图
  4. 如何配置Windows 防火墙,允许SQL Server的远程连接
  5. AMD加载器实现笔记(一)
  6. 【干货分享】Node.js 中文资料导航
  7. 从数组-&gt;ArrayList-&gt;List 为了方便与安全在不断变化着
  8. C# 读取指定URL的内容
  9. 文件读写操作(含SDCard的读写)
  10. javascript中子类如何继承父类
  11. VC中关于 0xcccccccc和 0xcdcdcdcd异常
  12. Linux进程状态解析之R、S、D、T、Z、X
  13. Codeforces Goodbye 2018
  14. sk-learn 决策树的超参数
  15. OAuth2.0 原理简介
  16. JPA之@Transient
  17. oracle中“ORA-00060: 等待资源时检测到死锁” 或存储过程编译卡死 解决方法
  18. IOS中input键盘事件支持的解决方法
  19. python cookbook 笔记二
  20. Python+Selenium学习--访问连接

热门文章

  1. python的set集合去重功能
  2. inotify+rsync文件实时同步
  3. wav音频的剪切
  4. 用.htaccess 禁止IP访问
  5. electronic初体验
  6. C# 截图不失真
  7. python utf8
  8. c++对c的扩展----引用类型
  9. 使用jdk自带的线程池。加载10个线程。
  10. 12、生命周期-@Bean指定初始化和销毁方法