ImageView的adjustViewBounds属性再解读
来源:互联网 发布:云计算与服务工程 编辑:程序博客网 时间:2024/06/05 04:07
------ adjustViewBounds属性要求api level 不小于18
If the application targets API level 17 or lower, adjustViewBounds will allow the drawable to shrink the view bounds, but not grow to fill available measured space in all cases. This is for compatibility with legacy MeasureSpec and RelativeLayout behavior.
------- 代码
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.gaos.viewanimation.MainActivity"> <ImageView android:id="@+id/imgview" android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/superman" /></RelativeLayout>
----------- 当我不限制ImageView的高度时
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.gaos.viewanimation.MainActivity"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/imgview" android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/superman" /> </ScrollView></RelativeLayout>
0 0
- ImageView的adjustViewBounds属性再解读
- ImageView的android:adjustViewBounds属性
- ImageView的android:adjustViewBounds属性
- ImageView的android:adjustViewBounds属性
- ImageView的android:adjustViewBounds属性
- ImageView的scaleType属性与adjustViewBounds属性
- android ImageView android:adjustViewBounds属性的作用。
- android ImageView android:adjustViewBounds属性的作用
- 记录ImageView.adjustViewBounds属性 遇到的问题
- 结合源码分析ImageView的adjustViewBounds属性
- ImageView的scaleType与adjustViewBounds属性
- ImageView.adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Android ImageView的scaleType属性与adjustViewBounds属性
- Direct3D初始化
- Unix网络编程三——套接字编程简介
- XML常见的面试题
- Android客户端利用OKhttp3,Jsoup简洁详细实现登录教务官网,并获取成绩,课程表,培养计划等
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- ImageView的adjustViewBounds属性再解读
- 十分钟搞定pandas
- Git远程操作详解
- Android平台下关于display部分的几个关键问题
- Linux指令初探之——Find的用法
- android 内存泄漏处理办法(持续更新中)
- pytorch学习笔记(七):pytorch hook 和 关于pytorch backward过程的理解
- elcipse护眼色背景和字体颜色设置
- android.support.v4.app.Fragment和android.app.Fragment区别