王士厅

音频悬浮窗配置子窗口透明(无效),布局调整

@@ -117,6 +117,12 @@ export default class EntryAbility extends UIAbility { @@ -117,6 +117,12 @@ export default class EntryAbility extends UIAbility {
117 return; 117 return;
118 } 118 }
119 console.info('floatWindowClass Succeeded in loading the content.'); 119 console.info('floatWindowClass Succeeded in loading the content.');
  120 + let color: string = 'rgba(0,0,0,0)';
  121 + try {
  122 + (floatWindowClass as window.Window).setWindowBackgroundColor(color);
  123 + } catch (exception) {
  124 + console.error('Failed to set the background color. Cause: ' + JSON.stringify(exception));
  125 + };
120 }); 126 });
121 127
122 floatWindowClass.on('windowEvent', (data) => { 128 floatWindowClass.on('windowEvent', (data) => {
@@ -88,7 +88,6 @@ struct Index { @@ -88,7 +88,6 @@ struct Index {
88 .height(20) 88 .height(20)
89 .fontColor('#222222') 89 .fontColor('#222222')
90 .fontSize(14) 90 .fontSize(14)
91 - .margin({ top: 10, left: 10 })  
92 .alignSelf(ItemAlign.Start) 91 .alignSelf(ItemAlign.Start)
93 .onStart(() => { 92 .onStart(() => {
94 console.info('Marquee animation complete onStart') 93 console.info('Marquee animation complete onStart')
@@ -115,7 +114,7 @@ struct Index { @@ -115,7 +114,7 @@ struct Index {
115 } 114 }
116 .width("100%") 115 .width("100%")
117 .height(16) 116 .height(16)
118 - .margin({ top: 4, left: 10 }) 117 + .margin({ top: 4})
119 118
120 Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule }) 119 Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule })
121 .color("#ED2800") 120 .color("#ED2800")
@@ -194,7 +193,13 @@ struct Index { @@ -194,7 +193,13 @@ struct Index {
194 ) 193 )
195 .width('100%') 194 .width('100%')
196 .height('100%') 195 .height('100%')
  196 + .borderRadius(4)
  197 + .padding({
  198 + top: 10,
  199 + bottom: 10,
  200 + left: 10,
  201 + right: 0
  202 + })
197 .backgroundColor(Color.White) 203 .backgroundColor(Color.White)
198 - .borderRadius(2)  
199 } 204 }
200 } 205 }