|
@@ -3402,6 +3402,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
WaterFlow({
|
|
WaterFlow({
|
|
|
|
|
+ scroller:this.waterScroller,
|
|
|
layoutMode: WaterFlowLayoutMode.SLIDING_WINDOW
|
|
layoutMode: WaterFlowLayoutMode.SLIDING_WINDOW
|
|
|
}) {
|
|
}) {
|
|
|
|
|
|
|
@@ -3601,12 +3602,16 @@ export struct LocalMusic {
|
|
|
Stack() {
|
|
Stack() {
|
|
|
Column() {
|
|
Column() {
|
|
|
Image(StrUtil.isEmpty(item.pixelMapPath) ? Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
Image(StrUtil.isEmpty(item.pixelMapPath) ? Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
- .attributeModifier(new ImageFancyModifier({
|
|
|
|
|
- topLeft: 10,
|
|
|
|
|
- topRight: 10,
|
|
|
|
|
|
|
+ .backgroundImageSize(ImageSize.Auto)
|
|
|
|
|
+ .borderRadius({
|
|
|
|
|
+ topLeft: 12,
|
|
|
|
|
+ topRight : 12,
|
|
|
bottomLeft: 0,
|
|
bottomLeft: 0,
|
|
|
bottomRight: 0
|
|
bottomRight: 0
|
|
|
- }, 60, 200))
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ .interpolation(ImageInterpolation.Medium)// 用于重采样后的抗锯齿
|
|
|
|
|
+ .draggable(false)// 禁止长按手势拖动
|
|
|
|
|
+ .autoResize(true) // 重采样,可减少内存占用
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('auto')
|
|
.height('auto')
|
|
|
.objectFit(ImageFit.Auto)
|
|
.objectFit(ImageFit.Auto)
|
|
@@ -3837,6 +3842,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private scroller: Scroller = new Scroller();
|
|
private scroller: Scroller = new Scroller();
|
|
|
|
|
+ private waterScroller: Scroller = new Scroller();
|
|
|
@State startIndex: number = 0
|
|
@State startIndex: number = 0
|
|
|
@State endIndex: number = 0
|
|
@State endIndex: number = 0
|
|
|
@State scaleValue: number = 1
|
|
@State scaleValue: number = 1
|
|
@@ -4382,7 +4388,7 @@ export struct LocalMusic {
|
|
|
Logger.info('this.twoFingerType2 = ' + this.twoFingerType);
|
|
Logger.info('this.twoFingerType2 = ' + this.twoFingerType);
|
|
|
if (this.twoFingerType < 1) {
|
|
if (this.twoFingerType < 1) {
|
|
|
this.twoFingerType = 4
|
|
this.twoFingerType = 4
|
|
|
-
|
|
|
|
|
|
|
+ this.columns = 1
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE, this.twoFingerType)
|
|
PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE, this.twoFingerType)
|
|
@@ -4810,8 +4816,12 @@ export struct LocalMusic {
|
|
|
if (!this.isGridMusic) {
|
|
if (!this.isGridMusic) {
|
|
|
this.listScroller.scrollToIndex(0)
|
|
this.listScroller.scrollToIndex(0)
|
|
|
}
|
|
}
|
|
|
|
|
+ if(this.twoFingerType==4){
|
|
|
|
|
+ this.scroller.scrollTo({ xOffset: 0, yOffset: 0 })
|
|
|
|
|
+ this.waterScroller.scrollTo({ xOffset: 0, yOffset: 0 })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }, 200)
|
|
|
|
|
|
|
+ }, 300)
|
|
|
break;
|
|
break;
|
|
|
case CommonConstants.TYPE_IS_ARTIST:
|
|
case CommonConstants.TYPE_IS_ARTIST:
|
|
|
// 进入艺术家前安全保存当前滚动偏移量,支持列表和网格
|
|
// 进入艺术家前安全保存当前滚动偏移量,支持列表和网格
|
|
@@ -6736,8 +6746,8 @@ export struct LocalMusic {
|
|
|
Stack() {
|
|
Stack() {
|
|
|
|
|
|
|
|
Image(StrUtil.isEmpty(item.pixelMapPath) ? $r('app.media.music_red') : item.pixelMapPath)
|
|
Image(StrUtil.isEmpty(item.pixelMapPath) ? $r('app.media.music_red') : item.pixelMapPath)
|
|
|
- .height(this.twoFingerType == 3 ? 55 : this.twoFingerType == 2 ? 35 : 30)
|
|
|
|
|
- .width(this.twoFingerType == 3 ? 55 : this.twoFingerType == 2 ? 35 : 30)
|
|
|
|
|
|
|
+ .height(this.twoFingerType == 3||this.twoFingerType==4 ? 55 : this.twoFingerType == 2 ? 45 : 38)
|
|
|
|
|
+ .width(this.twoFingerType == 3||this.twoFingerType==4 ? 55 : this.twoFingerType == 2 ? 35 : 38)
|
|
|
.alt($r('app.media.music_red'))
|
|
.alt($r('app.media.music_red'))
|
|
|
.fillColor(this.themeColor)
|
|
.fillColor(this.themeColor)
|
|
|
.borderRadius('100%')
|
|
.borderRadius('100%')
|
|
@@ -6813,6 +6823,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
.backgroundColor(Color.Transparent)
|
|
.backgroundColor(Color.Transparent)
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
|
|
+ .reuseId('son_item')
|
|
|
.height(this.twoFingerType == 3 ? ITEM_HEIGHT_BIG : this.twoFingerType == 2 ? ITEM_HEIGHT : ITEM_HEIGHT_SMALL)
|
|
.height(this.twoFingerType == 3 ? ITEM_HEIGHT_BIG : this.twoFingerType == 2 ? ITEM_HEIGHT : ITEM_HEIGHT_SMALL)
|
|
|
.shadow(this.scaleItem === index ? {
|
|
.shadow(this.scaleItem === index ? {
|
|
|
radius: 70,
|
|
radius: 70,
|