[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
* [Android] Fix the problem that changing image.resize in JS doesn't …
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen committed Oct 24, 2018
1 parent 86418bc commit 7372a4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public void refreshData(WXComponent component) {
@WXComponentProp(name = Constants.Name.RESIZE_MODE)
public void setResizeMode(String resizeMode) {
(getHostView()).setScaleType(getResizeMode(resizeMode));
getHostView().setImageDrawable(getHostView().getDrawable());
}

@RestrictTo(Scope.LIBRARY_GROUP)
Expand Down Expand Up @@ -191,7 +192,7 @@ protected ScaleType getResizeMode(String resizeMode) {

@WXComponentProp(name = Constants.Name.RESIZE)
public void setResize(String resize) {
(getHostView()).setScaleType(getResizeMode(resize));
setResizeMode(resize);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void setImageDrawable(@Nullable Drawable drawable, boolean isGif) {

@Override
public void setImageDrawable(@Nullable Drawable drawable) {
setImageDrawable(drawable, false);
setImageDrawable(drawable, gif);
}

@Override
Expand Down

0 comments on commit 7372a4d

Please sign in to comment.