onecold пре 8 месеци
родитељ
комит
c51a0aa6f7
1 измењених фајлова са 83 додато и 88 уклоњено
  1. 83 88
      entry/src/main/ets/view/LocalMusic.ets

+ 83 - 88
entry/src/main/ets/view/LocalMusic.ets

@@ -7147,11 +7147,10 @@ export struct LocalMusic {
     .height(this.bottomBarHeight)
     .hitTestBehavior(HitTestMode.Transparent)
     .bindContentCover($$this.isShowPlay, this.MusicPlayBuilder(), {
-      modalTransition: ModalTransition.NONE,
+      modalTransition: ModalTransition.ALPHA,
       onWillDisappear: () => {
         this.setShowPlayFalse()
       },
-      // backgroundColor: 'rgba(0, 0, 0, 0.9)',
     })
     .padding({
       left: 16,
@@ -10507,101 +10506,98 @@ export struct LocalMusic {
 
   @Builder
   TopPlayProgressView(){
-    Row() {
-      Column(){
-        Row(){
-          Stack(){
-            SymbolGlyph($r('sys.symbol.arrow_counterclockwise'))
-              .fontColor([Color.White])
-              .fontSize(21)
-              .effectStrategy(1)
-            Text(this.fastForwardSeconds)
-              .fontColor(Color.White)
-              .fontSize(10)
-              .fontWeight(FontWeight.Bold)
+    Column() {
+      Row(){
+        Stack(){
+          SymbolGlyph($r('sys.symbol.arrow_counterclockwise'))
+            .fontColor([Color.White])
+            .fontSize(21)
+            .effectStrategy(1)
+          Text(this.fastForwardSeconds)
+            .fontColor(Color.White)
+            .fontSize(10)
+            .fontWeight(FontWeight.Bold)
 
-          }
-          .margin({left:12,bottom:6})
-          .visibility(this.isShowBackFast?Visibility.Visible:Visibility.None)
-          .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
-          .onClick(()=>{
-            this.backForward()
-          })
-          Slider({
-            value: this.progressValue,
-            min: 0,
-            max: this.PROGRESS_MAX_VALUE,
-            step: 1,
-            style: SliderStyle.InSet
+        }
+        .padding({left:12,bottom:6})
+        .visibility(this.isShowBackFast?Visibility.Visible:Visibility.None)
+        .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
+        .onClick(()=>{
+          this.backForward()
+        })
+        Slider({
+          value: this.progressValue,
+          min: 0,
+          max: this.PROGRESS_MAX_VALUE,
+          step: 1,
+          style: SliderStyle.InSet
+        })
+          .height(20)
+          .blockColor('rgba(255,255,255,1)')
+          .trackColor('rgba(255,255,255,0.3)')
+          .selectedColor(Color.White)
+          .trackThickness(4)
+          .showSteps(false)
+          .showTips(true)
+          .layoutWeight(1)
+          .enabled(this.slideEnable)
+          .onChange((value: number, mode: SliderChangeMode) => {
+            // if (mode == 2) {
+            this.isSeekTo = true;
+            this.mDestroyPage = false;
+            this.showLoadIng();
+            LogUtils.getInstance().LOGI("slider-->seekValue start:" + value);
+            let seekValue = value * (this.mIjkMediaPlayer.getDuration() / 100);
+            this.seekTo(seekValue + "");
+            // this.setProgress()
+            LogUtils.getInstance().LOGI("slider-->seekValue end:" + seekValue);
+            this.isSeekTo = false;
+            // }
           })
-            .height(20)
-            .blockColor('rgba(255,255,255,1)')
-            .trackColor('rgba(255,255,255,0.3)')
-            .selectedColor(Color.White)
-            .trackThickness(4)
-            .layoutWeight(1)
-            .showSteps(false)
-            .showTips(true)
-            .alignSelf(ItemAlign.Center)
-            .enabled(this.slideEnable)
-            .onChange((value: number, mode: SliderChangeMode) => {
-              // if (mode == 2) {
-              this.isSeekTo = true;
-              this.mDestroyPage = false;
-              this.showLoadIng();
-              LogUtils.getInstance().LOGI("slider-->seekValue start:" + value);
-              let seekValue = value * (this.mIjkMediaPlayer.getDuration() / 100);
-              this.seekTo(seekValue + "");
-              // this.setProgress()
-              LogUtils.getInstance().LOGI("slider-->seekValue end:" + seekValue);
-              this.isSeekTo = false;
-              // }
-            })
-          Stack(){
-            SymbolGlyph($r('sys.symbol.arrow_clockwise'))
-              .fontColor([Color.White])
-              .fontSize(21)
-              .effectStrategy(1)
-            Text(this.fastForwardSeconds)
-              .fontColor(Color.White)
-              .fontSize(10)
-              .fontWeight(FontWeight.Bold)
 
-          }
-          .margin({right:10,bottom:6})
-          .visibility(this.isShowBackFast?Visibility.Visible:Visibility.None)
-          .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
-          .onClick(()=>{
-            this.fastForward()
-          })
-        }
-        .padding({ right: 7,left:22 })
-        Row(){
-          Text(this.currentTime)
-            .fontSize(10)
+
+
+        Stack(){
+          SymbolGlyph($r('sys.symbol.arrow_clockwise'))
+            .fontColor([Color.White])
+            .fontSize(21)
+            .effectStrategy(1)
+          Text(this.fastForwardSeconds)
             .fontColor(Color.White)
-          Blank()
-            .layoutWeight(1)
-          Text(this.totalTime)
             .fontSize(10)
-            .fontColor(Color.White)
+            .fontWeight(FontWeight.Bold)
+
         }
-        .justifyContent(FlexAlign.Start)
-        .padding({ right: 18,left:36 })
+        .padding({right:10,bottom:6})
+        .visibility(this.isShowBackFast?Visibility.Visible:Visibility.None)
+        .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
+        .onClick(()=>{
+          this.fastForward()
+        })
       }
-
-
+      .justifyContent(FlexAlign.Center)
+      .padding({left:20,right:20})
+      .width('95%')
+      Row() {
+        Text(this.currentTime)
+          .fontSize(10)
+          .fontColor(Color.White)
+          .margin({left:25})
+        Blank()
+        Text(this.totalTime)
+          .fontSize(10)
+          .fontColor(Color.White)
+          .margin({right:25})
+      }
+      .width('90%')
+      .height(10)
     }
-    //x5的竖屏模式需要99%
-    .width(this.isLandscape?'80%':'93%')
-    .justifyContent(FlexAlign.Center)
-    .margin({bottom:3})
-    .animation({
-      duration: 666,
-      curve: 'ease-in-out' // 可选动画曲线
-    })
+    .width('100%')
+    .alignItems(HorizontalAlign.Center)
+
   }
 
+
   //播放进度条
   @Builder
   BottomView(){
@@ -11120,7 +11116,6 @@ export struct LocalMusic {
       }
 
     }
-
     .width(CommonConstants.FULL_PERCENT)
     .clip(true)