Просмотр исходного кода

播放页底部的界面调整

onecold 1 год назад
Родитель
Сommit
1ed23f302a
1 измененных файлов с 47 добавлено и 47 удалено
  1. 47 47
      entry/src/main/ets/view/LocalMusic.ets

+ 47 - 47
entry/src/main/ets/view/LocalMusic.ets

@@ -7050,10 +7050,8 @@ export struct LocalMusic {
           (this.isPuraWP() ? 58 : 99)
           (this.isPuraWP() ? 58 : 99)
       })
       })
       .justifyContent(FlexAlign.Center)
       .justifyContent(FlexAlign.Center)
-      .height(this.isCoverOpacity() ? '95%' : '80%')
-
+      .height(this.isCoverOpacity() ? this.isPhoneLan()?'95%':'90%' : '82%')
     }
     }
-
   }
   }
 
 
   @Builder
   @Builder
@@ -7084,7 +7082,7 @@ export struct LocalMusic {
       //播放进度条
       //播放进度条
       this.BottomView()
       this.BottomView()
     }
     }
-    .position({ bottom: this.isHiCarSmall()?50:(this.isCoverOpacity() ? 55 : 100) }) // 将  固定在底部
+    .position({ bottom: this.isHiCarSmall()?50:(this.isCoverOpacity() ? 55 : 70) }) // 将  固定在底部
 
 
   }
   }
 
 
@@ -7109,6 +7107,7 @@ export struct LocalMusic {
               backgroundColor: Color.Transparent,
               backgroundColor: Color.Transparent,
             })
             })
         }
         }
+        .margin({ left: 5 })
         .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
         .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
         .backgroundColor(Color.Transparent)
         .backgroundColor(Color.Transparent)
         .onClick(() => {
         .onClick(() => {
@@ -7136,7 +7135,7 @@ export struct LocalMusic {
           Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ?
           Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ?
             (this.isCircleBtn?$r('app.media.hm_pause'):$r('app.media.ic_public_play'))
             (this.isCircleBtn?$r('app.media.hm_pause'):$r('app.media.ic_public_play'))
             : (this.isCircleBtn?$r('app.media.hm_play2'):$r('app.media.ic_public_pause')))
             : (this.isCircleBtn?$r('app.media.hm_play2'):$r('app.media.ic_public_pause')))
-            .width(this.isPhoneLan()?48:60)
+            .width(this.isPhoneLan()?45:55)
             .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
             .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
             .fillColor(Color.White)
             .fillColor(Color.White)
             .aspectRatio(CommonConstants.ASPECT_RATIO)
             .aspectRatio(CommonConstants.ASPECT_RATIO)
@@ -7190,8 +7189,8 @@ export struct LocalMusic {
       // .margin({ left: 5 })
       // .margin({ left: 5 })
 
 
     }
     }
-    .width('100%')
-    .margin({ left:10,right:10,bottom:this.isCoverOpacity()?0:20 })
+    .width('95%')
+    .margin({ bottom:this.isCoverOpacity()?0:20 })
     .justifyContent(FlexAlign.SpaceEvenly)
     .justifyContent(FlexAlign.SpaceEvenly)
   }
   }
 
 
@@ -7199,50 +7198,50 @@ export struct LocalMusic {
   @Builder
   @Builder
   TopPlayProgressView(){
   TopPlayProgressView(){
     Row() {
     Row() {
-      Text(this.currentTime)
-        .fontSize($r('app.float.slider_font_size'))
-        .fontColor(Color.White)
-        .margin({ right: PlayConstants.PROGRESS_MARGIN_LEFT,left:20 })
-      Slider({
-        value: this.progressValue,
-        min: 0,
-        max: this.PROGRESS_MAX_VALUE,
-        step: 1,
-        style: SliderStyle.OutSet
-      })
-        .width('600px')
-        .blockColor('rgba(255,255,255,1)')
-        .trackColor('rgba(255,255,255,0.3)')
-        .selectedColor(Color.White)
-        .trackThickness(PlayConstants.PROGRESS_TRACK_THICKNESS)
-        .layoutWeight(1)
-        .showSteps(false)
-        .showTips(true)
-        .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;
-          // }
+      Row(){
+        Text(this.currentTime)
+          .fontSize($r('app.float.slider_font_size'))
+          .fontColor(Color.White)
+          .margin({ right: 3,left:33 })
+        Slider({
+          value: this.progressValue,
+          min: 0,
+          max: this.PROGRESS_MAX_VALUE,
+          step: 1,
+          style: SliderStyle.OutSet
         })
         })
-      Text(this.totalTime)
-        .fontSize($r('app.float.slider_font_size'))
-        .fontColor(Color.White)
-        .margin({ left: PlayConstants.PROGRESS_MARGIN_LEFT,right:20 })
+          .blockColor('rgba(255,255,255,1)')
+          .trackColor('rgba(255,255,255,0.3)')
+          .selectedColor(Color.White)
+          .trackThickness(PlayConstants.PROGRESS_TRACK_THICKNESS)
+          .layoutWeight(1)
+          .showSteps(false)
+          .showTips(true)
+          .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;
+            // }
+          })
+        Text(this.totalTime)
+          .fontSize($r('app.float.slider_font_size'))
+          .fontColor(Color.White)
+          .margin({ left:1,right:20 })
+      }
 
 
     }
     }
     //x5的竖屏模式需要99%
     //x5的竖屏模式需要99%
     .width('95%')
     .width('95%')
-    .justifyContent(FlexAlign.SpaceEvenly)
-    .margin({bottom:16})
-    .height(25)
+    .justifyContent(FlexAlign.Center)
+    .margin({bottom:13})
     .animation({
     .animation({
       duration: 666,
       duration: 666,
       curve: 'ease-in-out' // 可选动画曲线
       curve: 'ease-in-out' // 可选动画曲线
@@ -7275,6 +7274,7 @@ export struct LocalMusic {
         }
         }
       }
       }
       .layoutWeight(1)
       .layoutWeight(1)
+      .margin({ left: 5 })
       .backgroundColor(Color.Transparent)
       .backgroundColor(Color.Transparent)
       .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
       .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
       .onClick(async () => {
       .onClick(async () => {
@@ -7360,7 +7360,7 @@ export struct LocalMusic {
     .width('95%')
     .width('95%')
     .justifyContent(FlexAlign.SpaceAround)
     .justifyContent(FlexAlign.SpaceAround)
     .height(30)
     .height(30)
-    .margin({top:5})
+    .margin({top:3})
     .animation({
     .animation({
       duration: 666,
       duration: 666,
       curve: 'ease-in-out' // 可选动画曲线
       curve: 'ease-in-out' // 可选动画曲线