王士厅

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

@@ -107,8 +107,18 @@ export default class EntryAbility extends UIAbility { @@ -107,8 +107,18 @@ export default class EntryAbility extends UIAbility {
107 ; 107 ;
108 }); 108 });
109 109
110 - floatWindowClass.on('windowEvent', (data) => {  
111 - EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_TYPE, data) 110 + floatWindowClass.setWindowFocusable(false, (err: BusinessError) => {
  111 + const errCode: number = err.code;
  112 + if (errCode) {
  113 + console.error(`Failed to set the window to be focusable. Cause code: ${err.code}, message: ${err.message}`);
  114 + return;
  115 + }
  116 + console.info('Succeeded in setting the window to be focusable.');
  117 + });
  118 +
  119 + floatWindowClass.on('touchOutside', () => {
  120 + console.info('touchOutside');
  121 + EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_TYPE, 3)
112 }); 122 });
113 123
114 }); 124 });
@@ -143,8 +143,14 @@ struct Index { @@ -143,8 +143,14 @@ struct Index {
143 .height(3) 143 .height(3)
144 .margin({ top: 7 }) 144 .margin({ top: 7 })
145 } 145 }
146 - .width("100%")  
147 - .height("100%") 146 + .padding({
  147 + top: 10,
  148 + bottom: 10,
  149 + left: 10,
  150 + right: 0
  151 + })
  152 + .width(243)
  153 + .height(60)
148 .justifyContent(FlexAlign.Start) 154 .justifyContent(FlexAlign.Start)
149 155
150 Row() { 156 Row() {
@@ -217,8 +223,6 @@ struct Index { @@ -217,8 +223,6 @@ struct Index {
217 }) 223 })
218 ) 224 )
219 ) 225 )
220 - .width('100%')  
221 - .height('100%')  
222 .borderRadius(4) 226 .borderRadius(4)
223 .padding({ 227 .padding({
224 top: 10, 228 top: 10,