首先将图片放在drawable下

然后:

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/test" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/test" />

注意图片文件名不要带后缀

src 则图片是原来的大小,background会占满整个ImageView

wrap_content 是原始大小

最新文章

  1. simple python code when @ simplnano
  2. 【caffe-windows】 caffe-master 之 mnist 超详细
  3. MySQL_PHP学习笔记_2015_0923_MySQL如何开启事件
  4. [非技术参考]C#重写ToString方法
  5. mpi和cuda混合编程的正确编译
  6. php中使用mysql_fetch_object向页面输出结果,总结!
  7. 再起航,我的学习笔记之JavaScript设计模式05(简单工程模式)
  8. 从web图片裁剪出发:了解H5中的Blob
  9. XSS DOM 测试
  10. DataOutputStream and DataInputStream
  11. LoadRunner服务水平协议SLA
  12. vue遍历时添加个数过滤条件
  13. vc写的dll被mingw的g++编译引用
  14. P2633 Count on a tree
  15. springboot升级到2.0后context-path配置不起作用
  16. 机器学习理论基础学习3.2--- Linear classification 线性分类之线性判别分析(LDA)
  17. perl 实现ascall 码转换
  18. commonjs, nodejs, npm, browserify, watchify
  19. 【Python】 \uxxxx转中文
  20. angularjs transitions

热门文章

  1. ubuntu下进入xampp mysql命令行
  2. SIFT特征点检测与匹配
  3. 积分图像 分类: 图像处理 Matlab 2015-06-06 10:30 149人阅读 评论(0) 收藏
  4. ORA-14074: partition bound must collate higher than that of the last partition
  5. redis的安装使用以及一些常用的命令
  6. flex布局(主要分清楚容器和条目)
  7. flutter 实现圆角头像的2种方法
  8. java线程池,信号量使用demo
  9. VirtualBox中的Linux读取Windows共享目录
  10. Spring.Boot.1 -- 概览