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