Try to fit thumb image view

This commit is contained in:
seven332 committed 2016-02-24 13:24:55 +08:00
1 parent 3575c856b4
commit 8360a86e80
3 files changed
+69 -1

No files matched your search

@@ -113,6 +113,10 @@ public class FixedAspectImageView extends ImageView {
mAdjustViewBounds = adjustViewBounds;
}
public boolean isAdjustViewBounds() {
return mAdjustViewBounds;
}
/**
* Enable aspect will set AdjustViewBounds true.
* Any negative float to disable it,
@@ -130,6 +134,10 @@ public class FixedAspectImageView extends ImageView {
requestLayout();
}
public float getAspect() {
return mAspect;
}
private int resolveAdjustedSize(int desiredSize, int minSize, int maxSize,
int measureSpec) {
int result = desiredSize;