Android Studio 使用图片
2024-08-25 00:48:56
首先将图片放在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 是原始大小
最新文章
- simple python code when @ simplnano
- 【caffe-windows】 caffe-master 之 mnist 超详细
- MySQL_PHP学习笔记_2015_0923_MySQL如何开启事件
- [非技术参考]C#重写ToString方法
- mpi和cuda混合编程的正确编译
- php中使用mysql_fetch_object向页面输出结果,总结!
- 再起航,我的学习笔记之JavaScript设计模式05(简单工程模式)
- 从web图片裁剪出发:了解H5中的Blob
- XSS DOM 测试
- DataOutputStream and DataInputStream
- LoadRunner服务水平协议SLA
- vue遍历时添加个数过滤条件
- vc写的dll被mingw的g++编译引用
- P2633 Count on a tree
- springboot升级到2.0后context-path配置不起作用
- 机器学习理论基础学习3.2--- Linear classification 线性分类之线性判别分析(LDA)
- perl 实现ascall 码转换
- commonjs, nodejs, npm, browserify, watchify
- 【Python】 \uxxxx转中文
- angularjs transitions
热门文章
- ubuntu下进入xampp mysql命令行
- SIFT特征点检测与匹配
- 积分图像 分类: 图像处理 Matlab 2015-06-06 10:30 149人阅读 评论(0) 收藏
- ORA-14074: partition bound must collate higher than that of the last partition
- redis的安装使用以及一些常用的命令
- flex布局(主要分清楚容器和条目)
- flutter 实现圆角头像的2种方法
- java线程池,信号量使用demo
- VirtualBox中的Linux读取Windows共享目录
- Spring.Boot.1 -- 概览