[Android基础学习]ImageView 图片不拉伸
2015-12-31 14:03
411 查看
要使ImageView图片不拉伸,两点:
1、ImageView的图片显示状态设为:android:scaleType="centerInside"
2、ImageView设置src而不是background,使用函数的话就是setImageResource而不是setBackgroundDrawable
1、ImageView的图片显示状态设为:android:scaleType="centerInside"
2、ImageView设置src而不是background,使用函数的话就是setImageResource而不是setBackgroundDrawable
相关文章推荐
- 菜鸟之路-android下sqlite使用的一些总结
- 例说如何编译android模块
- Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRID
- android-Animating Views Using Scenes and Transitions
- Android Studio快捷键每日一练(2)
- android 4.0 到 4.4的不同(我碰到的)
- android Graphics(一):概述及基本几何图形绘制
- Android Studio代码主题设置
- has leaked window com.android.internal.policy.impl.PhoneWindow$ that was originally added here
- android 创建多线程的几种方法
- as 开发常用的快捷键
- Android Studio实现跨进程调用Service (AILD Service)
- Android 保存bitmap到相册
- Android开发笔记(三十六)展示类控件
- android.support.design.widget.TabLayout的使用
- Android中图片大小和屏幕密度的关系讲解
- 关于红杏的公益代理, Android Studio以及freso的编译
- android socket通信
- android studio系列之插件Android ButterKnife Zelezny
- android studio 工程导入部分注意事项