Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

fix wrong ScaleType init error #167

Merged
merged 1 commit into from
Aug 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class RoundedImageView extends ImageView {
private boolean mMutateBackground = false;
private int mResource;
private int mBackgroundResource;
private ScaleType mScaleType = ScaleType.FIT_CENTER;
private ScaleType mScaleType;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If set init value for mScaleType and no android:scaleType set in xml, ImageView#init() would not call setScaleType() and in RoundedImageView constructor setScaleType would be called but super.setScaleType() cannot be called.
image

And that leads to the issue bug.

private Shader.TileMode mTileModeX = DEFAULT_TILE_MODE;
private Shader.TileMode mTileModeY = DEFAULT_TILE_MODE;

Expand Down