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

Commit

Permalink
+ [Android] Change method access level for image (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen committed Aug 7, 2018
1 parent d7c949b commit 2c78b65
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*/
package com.taobao.weex.ui.component;

import android.support.annotation.RestrictTo;
import android.support.annotation.RestrictTo.Scope;
import com.taobao.weex.dom.WXImageQuality;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.HashMap;
Expand Down Expand Up @@ -159,7 +162,8 @@ public void setResizeMode(String resizeMode) {
(getHostView()).setScaleType(getResizeMode(resizeMode));
}

private ScaleType getResizeMode(String resizeMode) {
@RestrictTo(Scope.LIBRARY_GROUP)
protected ScaleType getResizeMode(String resizeMode) {
ScaleType scaleType = ScaleType.FIT_XY;
if (TextUtils.isEmpty(resizeMode)) {
return scaleType;
Expand Down Expand Up @@ -337,10 +341,15 @@ public void onImageFinish(String url, ImageView imageView, boolean result, Map e
IWXImgLoaderAdapter imgLoaderAdapter = getInstance().getImgLoaderAdapter();
if (imgLoaderAdapter != null) {
imgLoaderAdapter.setImage(rewrited.toString(), getHostView(),
getAttrs().getImageQuality(), imageStrategy);
getImageQuality(), imageStrategy);
}
}

@RestrictTo(Scope.LIBRARY_GROUP)
protected WXImageQuality getImageQuality(){
return getAttrs().getImageQuality();
}

@Override
protected void onFinishLayout() {
super.onFinishLayout();
Expand Down

0 comments on commit 2c78b65

Please sign in to comment.