ImageView属性小结

待改进

属性

  1. android:adjustViewBounds:Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable. [boolean]:设置控件的边界是否要随里面的图片调整。

    方法

    • setAdjustViewBounds(boolean)
  2. android:baseline:The offset of the baseline within this view. [dimension]

    Related Methods

    • setBaseline(int)
  3. android:baselineAlignBottom:If true, the image view will be baseline aligned with based on its bottom edge.[boolean]:底边对齐

    Related Methods

    • setBaselineAlignBottom(boolean)
  4. android:cropToPadding:If true, the image will be cropped to fit within its padding.[boolean] :图片会裁剪

    Related Methods

    • setCropToPadding(boolean)
  5. android:maxHeight:An optional argument to supply a maximum height for this view. [dimension]:设置控件的最大高度

    Related Methods

    • setMaxHeight(int)
  6. android:maxWidth

    Related Methods

    • setMaxWidth(int)
  7. android:scaleType:Controls how the image should be resized or moved to match the size of this ImageView.[enum]:设置控件内部的图片的显示模式

    Values

    • matrix:0,
    • fitXY:1,
    • fitStart:2,
    • fitCenter:3,
    • fitEnd:4,
    • center:5,
    • centerCrop:6,
    • centerInside:7,

    Related Methods

    • setScaleType(ImageView.ScaleType)
  8. android:src:Sets a drawable as the content of this ImageView.[dimension]:设置图片源

    Related Methods

    • setImageResource(int)
  9. android:tint:Set a tinting color for the image.[color]:设置图片颜色,默认设置SRC_ATOP

    Related Methods

    • setImageTintList(ColorStateList)
  10. android:tintMode:Blending mode used to apply the image tint.[enum]:图片的颜色模式

    Values

    • src_over:3,
    • src_in:5,
    • src_atop:9,
    • multiply:14,
    • screen:15,
    • add:16

    Related Methods

    • setImageTintMode(PorterDuff.Mode)

更多相关文章

  1. android中获取一个xml布局中一个控件的宽高.
  2. android 加载图片轻松避免OOM(out of memory) 支持设置缓存大小,
  3. 下载显示网路图片的例子
  4. android 处理图片之--bitmap处理
  5. android Bimtap 各种图片处理方法、图片特效
  6. Android如何实现图片轮播

随机推荐

  1. The Toast in android
  2. Android简单的计算控件使用
  3. Android中ArcGIS中实现DrawTool类
  4. android自定义组件
  5. android 设置状态栏全透明,背景延伸到状态
  6. android中利用socket上传文件
  7. Android拷贝压缩文件到程序目录
  8. Android 刷新框架SmartRefreshLayout
  9. Android(安卓)组件的抽屉(初级)
  10. android之Switch开关