HarmonyOS 鸿蒙Next应用打开人脸识别后,全屏效果消失
HarmonyOS 鸿蒙Next应用打开人脸识别后,全屏效果消失
- APP已设置全屏
- 打开系统的活体检测功能
- 回到APP,发现APP已经不再是全屏了,咨询需要怎么配置才能继续保持全屏状态
2 回复
开发者你好,根据现有demo进行修改之后,经多次测试,打开人脸识别之后再点返回,是可以全屏的了,如下:
import { FaceManager } from './FaceManager';
@Entry
@Component
struct Index {
build() {
Column() {
Text("打开人脸")
.id('HelloWorld1')
.fontSize(50)
.fontWeight(FontWeight.Bold)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
}).onClick(()=>{
FaceManager.privateStartDetection(getContext(this))
})
}
.height('100%')
.width('100%').justifyContent(FlexAlign.Center)
.backgroundColor(Color.Orange)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
}
更多关于HarmonyOS 鸿蒙Next应用打开人脸识别后,全屏效果消失的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html