ImageView屬性小結
待改進
屬性
-
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)
-
android:baseline
:The offset of the baseline within this view. [dimension]Related Methods
- setBaseline(int)
-
android:baselineAlignBottom
:If true, the image view will be baseline aligned with based on its bottom edge.[boolean]:底邊對齊Related Methods
- setBaselineAlignBottom(boolean)
-
android:cropToPadding
:If true, the image will be cropped to fit within its padding.[boolean] :圖片會裁剪Related Methods
- setCropToPadding(boolean)
-
android:maxHeight
:An optional argument to supply a maximum height for this view. [dimension]:設置控件的最大高度Related Methods
- setMaxHeight(int)
-
android:maxWidth
Related Methods
- setMaxWidth(int)
-
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)
-
android:src
:Sets a drawable as the content of this ImageView.[dimension]:設置圖片源Related Methods
- setImageResource(int)
-
android:tint
:Set a tinting color for the image.[color]:設置圖片顏色箱蝠,默認設置SRC_ATOP
Related Methods
- setImageTintList(ColorStateList)
-
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)