diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 1a1855ebf7516ee5f93f2fbdaaaad9e84625bae1..76d975f7811ad311c25d197ac30d1dd98e02d3ea 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -45,6 +45,7 @@ export default class EntryAbility extends UIAbility { // [EndExclude WindowSizeChange] let isFront: boolean | undefined = AppStorage.get('isFront'); let surfaceId: string | undefined = AppStorage.get('surfaceId'); + // In the trifold M state, select the back camera. if (widthBp === WidthBreakpoint.WIDTH_MD && heightBp === HeightBreakpoint.HEIGHT_MD && deviceInfo.productSeries === 'GRL') { this.cameraUtil?.cameraShooting(surfaceId!, this.context!, camera.CameraPosition.CAMERA_POSITION_BACK); diff --git a/entry/src/main/ets/views/CommonView.ets b/entry/src/main/ets/views/CommonView.ets index a6fc0a0752a0bed8894dd55eb6ca154ed568a178..a03865c602bfe7b21832f11282fe9d561738f892 100644 --- a/entry/src/main/ets/views/CommonView.ets +++ b/entry/src/main/ets/views/CommonView.ets @@ -51,17 +51,22 @@ export struct SettingButton { build() { Column() { Image(this.imageButton) - .height(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 48 : 30), 48, 48).getValue(this.widthBp)) - .width(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 48 : 30), 48, 48).getValue(this.widthBp)) + .height(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 48 : 30), 48, + 48).getValue(this.widthBp)) + .width(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 48 : 30), 48, + 48).getValue(this.widthBp)) .margin({ bottom: 2 }) Text(this.text) - .lineHeight(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 16 : 14), 16, 16).getValue(this.widthBp)) - .fontSize(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 12 : 10), 12, 12).getValue(this.widthBp)) + .lineHeight(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 16 : 14), 16, + 16).getValue(this.widthBp)) + .fontSize(new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 12 : 10), 12, + 12).getValue(this.widthBp)) .fontColor(Color.White) } .width(40) .margin({ - bottom: new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 16 : 8), 16, 16).getValue(this.widthBp)}) + bottom: new BreakpointType((this.heightBp === HeightBreakpoint.HEIGHT_LG ? 16 : 8), 16, 16).getValue(this.widthBp) + }) } } @@ -133,7 +138,8 @@ export struct ShotAreaSm { .onClick(() => { let isFront: boolean | undefined = AppStorage.get('isFront'); if (isFront) { - this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, camera.CameraPosition.CAMERA_POSITION_BACK); + this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, + camera.CameraPosition.CAMERA_POSITION_BACK); return; } this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, camera.CameraPosition.CAMERA_POSITION_FRONT); @@ -167,7 +173,8 @@ export struct ShotArea { .onClick(() => { let isFront: boolean | undefined = AppStorage.get('isFront'); if (isFront) { - this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, camera.CameraPosition.CAMERA_POSITION_BACK); + this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, + camera.CameraPosition.CAMERA_POSITION_BACK); return; } this.cameraUtil?.cameraShooting(this.surfaceId, this.context!, camera.CameraPosition.CAMERA_POSITION_FRONT);