mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-16 12:12:20 +08:00
Fix android's image tintColor prop when used with alpha
Summary:Fixes https://github.com/facebook/react-native/issues/6075 UIExplorer example has been tested with 4 levels of opacity(100,75,50,25)  Closes https://github.com/facebook/react-native/pull/6090 Differential Revision: D2979913 Pulled By: mkonicek fb-gh-sync-id: ff30dec853935a059979096d9b1da9088d146249 shipit-source-id: ff30dec853935a059979096d9b1da9088d146249
This commit is contained in:
committed by
facebook-github-bot-7
parent
5112a63953
commit
8b88cae747
@@ -14,6 +14,7 @@ import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff.Mode;
|
||||
|
||||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.drawee.controller.AbstractDraweeControllerBuilder;
|
||||
@@ -120,7 +121,7 @@ public class ReactImageManager extends SimpleViewManager<ReactImageView> {
|
||||
if (tintColor == null) {
|
||||
view.clearColorFilter();
|
||||
} else {
|
||||
view.setColorFilter(tintColor);
|
||||
view.setColorFilter(tintColor, Mode.SRC_IN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user