Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yanlu
2024-05-09 10:14:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5d59ff2eab920cc6d2a3acefd1026a2f405c8884
5d59ff2e
1 parent
71bfa8dd
fix:早晚报视频展示效果
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
5d59ff2
import { Action, ContentDTO, Params } from 'wdBean';
import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
import { Logger, ToastUtils } from 'wdKit';
import { Logger, ToastUtils
, DateTimeUtils
} from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
import { ProcessUtils, WDRouterRule } from 'wdRouter';
...
...
@@ -433,15 +433,32 @@ export struct PaperSingleColumn999CardView {
.aspectRatio(16 / 9)
.padding({ top: 10 })
if (this.item?.videoInfo) {
Stack() {
Text(this.item?.videoInfo.videoDuration + "")
.backgroundColor(Color.Black)
.opacity(0.6)
Row() {
Image($r('app.media.card_play'))
.width(14)
.height(14)
.objectFit(ImageFit.Contain)
Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000))
.fontColor(Color.White)
.fontSize($r('app.float.vp_12'))
.fontWeight(500)
.textAlign(TextAlign.End)
.lineHeight(18)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
.margin({
right: 10,
left: 3
})
}
.margin({
bottom: 3
})
.width(CommonConstants.FULL_PARENT)
.padding({ left: 40 })
Image($r('app.media.iv_card_play_yellow_flag'))
.fitOriginalSize(true)
}.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.End)
}
}.margin({ left: 22, right: 22 })
}
...
...
Please
register
or
login
to post a comment