王士厅

OperRowListView.ets 音频按钮替换成gif

... ... @@ -11,13 +11,10 @@ import {
postExecuteCollectRecordParams
} from 'wdBean';
import router from '@ohos.router';
import inputMethod from '@ohos.inputMethod';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import { LikeComponent } from './LikeComponent';
import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent';
import { publishCommentModel } from '../comment/model/PublishCommentModel'
// import { AudioBarView } from '../MorningEveningPaper/AudioBarView'
// import { AudioDialog } from '../../dialog/AudioDialog'
import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { PageRepository } from '../../repository/PageRepository';
... ... @@ -26,7 +23,6 @@ import { WDShare } from 'wdShare/Index';
import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel'
import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
import { PlayerConstants } from 'wdPlayer'
import { LottieView } from '../lottie/LottieView'
const TAG = 'OperRowListView';
... ... @@ -294,26 +290,7 @@ export struct OperRowListView {
@Builder
builderListen() {
Column() {
if(this.currentStatus === PlayerConstants.STATUS_START) {
Column() {
LottieView({
name: this.name,
path: "lottie/audio_recommend_playing.json",
lottieWidth: 24,
lottieHeight: 24,
autoplay: true,
loop: true
})
}
.width(25)
.height(25)
.parallelGesture(
TapGesture()
.onAction((event: GestureEvent) => {
this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle)
}))
} else {
Image($r("app.media.icon_listen"))
Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.ic_voice_playing") : $r("app.media.icon_listen"))
.width(24)
.height(24)
.aspectRatio(1)
... ... @@ -324,7 +301,6 @@ export struct OperRowListView {
this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle)
}))
}
}
.height(36)
.width(48)
.justifyContent(FlexAlign.Center)
... ...