feat:align android and iOS image's default scale type
This commit is contained in:
parent
0cfbef67a2
commit
4ea6da2d0a
@ -66,7 +66,9 @@ public class ImageNode extends ViewNode<ImageView> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ImageView build() {
|
protected ImageView build() {
|
||||||
return new ImageView(getContext());
|
ImageView imageView = new ImageView(getContext());
|
||||||
|
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||||
|
return imageView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,6 +39,7 @@ @implementation DoricImageNode
|
|||||||
- (UIImageView *)build {
|
- (UIImageView *)build {
|
||||||
return [[YYAnimatedImageView new] also:^(UIImageView *it) {
|
return [[YYAnimatedImageView new] also:^(UIImageView *it) {
|
||||||
it.clipsToBounds = YES;
|
it.clipsToBounds = YES;
|
||||||
|
it.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user