王士厅

语音播报后导致华为自带的返回功能无效

... ... @@ -107,8 +107,18 @@ export default class EntryAbility extends UIAbility {
;
});
floatWindowClass.on('windowEvent', (data) => {
EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_TYPE, data)
floatWindowClass.setWindowFocusable(false, (err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
console.error(`Failed to set the window to be focusable. Cause code: ${err.code}, message: ${err.message}`);
return;
}
console.info('Succeeded in setting the window to be focusable.');
});
floatWindowClass.on('touchOutside', () => {
console.info('touchOutside');
EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_TYPE, 3)
});
});
... ...
... ... @@ -143,8 +143,14 @@ struct Index {
.height(3)
.margin({ top: 7 })
}
.width("100%")
.height("100%")
.padding({
top: 10,
bottom: 10,
left: 10,
right: 0
})
.width(243)
.height(60)
.justifyContent(FlexAlign.Start)
Row() {
... ... @@ -217,8 +223,6 @@ struct Index {
})
)
)
.width('100%')
.height('100%')
.borderRadius(4)
.padding({
top: 10,
... ...