|
|
@@ -504,17 +504,8 @@ export struct LocalMusic {
|
|
|
if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
|
|
|
(this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
|
|
|
this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
|
|
|
- this.hideDone = false;
|
|
|
- this.getUIContext().animateTo({
|
|
|
- duration: 300
|
|
|
- }, () => {
|
|
|
- this.bottomBarHeight = 55 + 0;
|
|
|
- this.topBarHeight = 50 + 0;
|
|
|
- this.barOpacity = 1;
|
|
|
- this.barBottomOpacity = 1;
|
|
|
- this.currentYOffset = 0;
|
|
|
- this.isHiding = false;
|
|
|
- });
|
|
|
+ this.setBarHeightNormal()
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -2530,6 +2521,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
})
|
|
|
.onClick(() => {
|
|
|
+ // ToastUtil.showToast('当前的手机的折叠状态 ='+DisplayUtil.getFoldStatus())
|
|
|
if (this.modeType === 0) {
|
|
|
if (ArrayUtil.isNotEmpty(this.getCurFileList())) {
|
|
|
this.doPlay(this.getCurFileList()[0])
|
|
|
@@ -2801,10 +2793,11 @@ export struct LocalMusic {
|
|
|
this.itemMove(index, index + 1)
|
|
|
}
|
|
|
|
|
|
+ private scroller: Scroller = new Scroller();
|
|
|
@Builder
|
|
|
getGridView(){
|
|
|
|
|
|
- Grid() {
|
|
|
+ Grid(this.scroller) {
|
|
|
LazyForEach(this.dataSource, (item: VideoItem, index: number) => {
|
|
|
GridItem() {
|
|
|
Stack({ alignContent: Alignment.Center }) {
|
|
|
@@ -2852,6 +2845,13 @@ export struct LocalMusic {
|
|
|
this.left(index);
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+ // if (this.offsetY > this.FIX_VP_Y * 0.7) {
|
|
|
+ // this.scroller.scrollToIndex(index + 10, true,ScrollAlign.CENTER);
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
.onActionEnd(() => {
|
|
|
this.getUIContext().animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
|
|
|
@@ -2882,7 +2882,7 @@ export struct LocalMusic {
|
|
|
.layoutWeight(1)
|
|
|
.scrollBar(BarState.Off)
|
|
|
.supportAnimation(true)
|
|
|
- .cachedCount(20)
|
|
|
+ // .cachedCount(5)
|
|
|
.columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 4))
|
|
|
.rowsGap(12)
|
|
|
.visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
|
|
|
@@ -2916,7 +2916,7 @@ export struct LocalMusic {
|
|
|
Stack() {
|
|
|
|
|
|
Column() {
|
|
|
- Image(StrUtil.isEmpty(item.pixelMapPath) ? $r('app.media.ic_avatar6') : item.pixelMapPath)
|
|
|
+ Image(StrUtil.isEmpty(item.pixelMapPath) ?Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
.height(150)
|
|
|
.width(150)
|
|
|
.alt($r('app.media.ic_avatar6'))
|
|
|
@@ -3125,7 +3125,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
.width(180)
|
|
|
}
|
|
|
- .height('40%')
|
|
|
+ .height(item.type === CommonConstants.TYPE_IS_DIR ?'22%':'40%')
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -4673,7 +4673,7 @@ export struct LocalMusic {
|
|
|
isPhoneLan() {
|
|
|
if (DeviceUtil.getDeviceType() === resourceManager.DeviceType.DEVICE_TYPE_PHONE
|
|
|
&& this.currentBreakpoint !== BreakpointTypeEnum.SM) {
|
|
|
- if (DisplayUtil.getFoldStatus() === 0 || DisplayUtil.getFoldStatus() === 2) {
|
|
|
+ if (DisplayUtil.getFoldStatus() === 0 ) {
|
|
|
return true
|
|
|
}
|
|
|
}
|