@Entry({routeName:RouterUrl.Base_BjxLoadingProgress})
@Component
export struct BjxLoadingProgress{
build() {
Column(){
LoadingProgress()
.width(150)
.height(150)
.padding(10)
.color(Color.Blue)
.backgroundColor(Color.Green)
.borderRadius(10)
}
.justifyContent(FlexAlign.Center)
.backgroundColor(Color.Transparent)
.width(CommonConstants.FULL_WIDTH_PERCENT)
.height(CommonConstants.FULL_HEIGHT_PERCENT)
}
}
设置透明并不能让当前页生效,还是看不到上个界面
主窗口规格是没有白色背景,但是也做不到完全透明,会有高斯模糊。子窗口设置窗口背景颜色为透明后为透明。參考如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-window-V5\#setwindowbackgroundcolor9
如果要设置类似这种加载进度的LoadingProgress的话,也可以尝试下使用NavDestination,NavDestinationMode属性设置为DIALOG默认透明https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-navdestination-V5
可以尝试直接在EntryAbility中添加
其次如果直接在page中也可以