两种不同的点九图片
来源:互联网 发布:淘宝充话费网店软件 编辑:程序博客网 时间:2024/04/28 07:58
Section1
1.图一
2.图二
其中图一,作为背景或者图片是可以伸展开的,
而图二,怎么做都和边框有间隙
================================================================
Section2
如下:
图一 作为图片src ,背景红色
scaleType fitXY
图二作为图片src,背景红色
===================================================
刚开始以为是容器和父容器有边距或者是其他什么bug,最后发现原来是图片的原因。。
Section3
对于这个问题,google官方是这么解释的
You can also define an optional drawable section of the image (effectively, the padding lines) by drawing a line on the right and bottom lines. If a View object sets the NinePatch as its background and then specifies the View's text, it will stretch itself so that all the text fits inside only the area designated by the right and bottom lines (if included). If the padding lines are not included, Android uses the left and top lines to define this drawable area.
The border is used to define the stretchable and static areas of the image. You indicate a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the left and top part of the border (the other border pixels should be fully transparent or white). You can have as many stretchable sections as you want: their relative size stays the same, so the largest sections always remain the largest
配图如下
简单说来,意思就是,
左边和上边的line 是用来确定拉伸哪些区域的
右边和下边的line是用来确定padding的
- 两种不同的点九图片
- android点九图片
- 点九:避免Andriod平台图片失真的图片形式
- 点九:避免Andriod平台图片失真的图片形式
- 两种不同的Context
- Android .9.png “点九”图片的使用
- OpenCV 两张大小不同图片的叠加
- 两幅图片逐个像素对比筛选不同的区域
- 使用opencv查找两张图片不同的部分
- 【opencv】获取图片某点像素值的两种方法
- Footer的两种不同的位置
- 两种不同的引擎的区别
- 两种不同连接池不同的加载配置文件方式
- 你真的了解UIImage加载图片的两种方法么?只有20%的人才知道的不同
- 两种不同的Web应用
- laszlo方法的两种不同写法
- Singleton的两种不同实现方法.
- 两种不同的Web应用
- Tomcat启动抛错——SEVERE: Error configuring application listener of class org.springframework.web.context.
- Java继承和构造器
- MyBatis typeAlias
- 【LEFT JOIN 实战记录】统计查询-整改事项查询(多表联合查询+多次左连接字典表)
- 50个常用sql语句 网上流行的学生选课表的例子
- 两种不同的点九图片
- 如何设置word为只读
- 在shell脚本中如何调用hadoop 命令
- ssh项目中,对于spring的bean.xml和web.xml文件的基本配置
- mysql 表别名.字段名 的符号
- csdn改版
- linux学习第十五篇:磁盘格式化,磁盘挂载,手动增加swap空间
- 国内知名SAAS CRM平台排行 雀搜竟然排第一
- APIC (Advanced Programmable Interrupt Controller高级可编程中断控制器)