Drawable getIntrinsicWidth() and getIntrinsicHeight()
16lz
2021-01-25
getIntrinsicWidth
Added in API level 1int getIntrinsicWidth ()
Returns the drawable's intrinsic width.
Intrinsic width is the width at which the drawable would like to be laid out, including any inherent padding. If the drawable has no intrinsic width, such as a solid color, this method returns -1.
getIntrinsicHeight
Added in API level 1int getIntrinsicHeight ()
Returns the drawable's intrinsic height.
Intrinsic height is the height at which the drawable would like to be laid out, including any inherent padding. If the drawable has no intrinsic height, such as a solid color, this method returns -1.
=================================================================================================
原文URL:http://stackoverflow.com/questions/6536418/why-are-the-width-height-of-the-drawable-in-imageview-wrong
更多相关文章
- Talking about Android(安卓)process
- Service API changes starting with Android(安卓)2.0
- Android开发必备的21个免费资源和工具
- [翻译]Android单手指缩放-第四部分(Android(安卓)one finger zoom
- 转:android 删除editText的内容
- Android(安卓)TextView 字段设置监听事件
- 用Preferences,通过xml文件跳转到另一个Activity
- [置顶] 我的Android进阶之旅------>Android的ListView数据更新后
- Android的Master/Detail风格界面中实现自定义ListView的单选