|
|
@@ -1,4 +1,5 @@
|
|
|
import StyleConstants from '../constants/StyleConstants'
|
|
|
+import { YTAvoid } from '../utils/YTAvoid'
|
|
|
|
|
|
export class BackgroundPageModifier implements AttributeModifier<CommonAttribute> {
|
|
|
isNeedImage: boolean
|
|
|
@@ -21,8 +22,8 @@ export class BackgroundPageModifier implements AttributeModifier<CommonAttribute
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })//backgroundImageSize((ImageSize.Cover))
|
|
|
.backgroundImagePosition(Alignment.Center)
|
|
|
.padding({
|
|
|
- top: this.isNeedPaddingTop ? StyleConstants.TOP_HEIGHT : 0,
|
|
|
- bottom: this.isNeedPaddingBottom ? StyleConstants.BOTTOM_HEIGHT : 0,
|
|
|
+ top: this.isNeedPaddingTop ? YTAvoid.getTop() : 0,
|
|
|
+ bottom: this.isNeedPaddingBottom ? YTAvoid.getBottom(): 0,
|
|
|
left: 10,
|
|
|
right: 10
|
|
|
})
|
|
|
@@ -32,8 +33,8 @@ export class BackgroundPageModifier implements AttributeModifier<CommonAttribute
|
|
|
.width(StyleConstants.FULL_PARENT)
|
|
|
.backgroundColor($r("app.color.theme_bg_color"))
|
|
|
.padding({
|
|
|
- top: this.isNeedPaddingTop ? StyleConstants.TOP_HEIGHT : 0,
|
|
|
- bottom: this.isNeedPaddingBottom ? StyleConstants.BOTTOM_HEIGHT : 0,
|
|
|
+ top: this.isNeedPaddingTop ? YTAvoid.getTop() : 0,
|
|
|
+ bottom: this.isNeedPaddingBottom ? YTAvoid.getBottom(): 0,
|
|
|
left: 10,
|
|
|
right: 10
|
|
|
})
|