android: reset view node when reuse this node

This commit is contained in:
pengfei.zhou
2021-10-27 17:29:33 +08:00
committed by osborn
parent 60c8651e10
commit 481e643ff9
12 changed files with 134 additions and 0 deletions

View File

@@ -636,5 +636,8 @@ - (void)reset {
self.errorColor = nil;
self.errorImage = nil;
self.errorImageBase64 = nil;
self.imageScale = UIScreen.mainScreen.scale;
self.blurEffectView = nil;
self.view.contentMode = UIViewContentModeScaleAspectFill;
}
@end

View File

@@ -933,7 +933,11 @@ - (CAMediaTimingFunction *)translateToTimingFunction:(NSNumber *)timingFunction
- (void)reset {
self.view.backgroundColor = UIColor.clearColor;
DoricLayoutType doricLayoutType = self.view.doricLayout.layoutType;
self.view.doricLayout = [[DoricLayout new] also:^(DoricLayout *it) {
it.width = 0;
it.height = 0;
it.layoutType = doricLayoutType;
it.view = self.view;
}];