mirror of
https://github.com/openharmony/applications_screenlock.git
synced 2026-07-18 01:36:04 -04:00
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AbilityStage from "@ohos.application.AbilityStage";
|
||||
import AbilityStage from "@ohos.app.ability.AbilityStage";
|
||||
import Log from '../../../../../common/src/main/ets/default/Log';
|
||||
|
||||
const TAG = "Entry_AbilityStage";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ability from '@ohos.application.Ability'
|
||||
import Ability from '@ohos.app.ability.UIAbility'
|
||||
import Log from '../../../../../common/src/main/ets/default/Log';
|
||||
|
||||
const TAG = "Entry_MainAbility";
|
||||
|
||||
@@ -19,7 +19,7 @@ import WantAgent from '@ohos.wantAgent';
|
||||
const TAG = 'CommonUtil';
|
||||
const DEFAULT_INFO = {
|
||||
code: 0,
|
||||
want: '',
|
||||
want: {},
|
||||
permission: '',
|
||||
extraInfo: {}
|
||||
};
|
||||
|
||||
@@ -81,7 +81,7 @@ export default struct GroupItem {
|
||||
.borderRadius($r("sys.float.ohos_id_corner_radius_default_l"))
|
||||
.clip(true)
|
||||
.scrollable(ScrollDirection.Horizontal)
|
||||
.scrollBar(BarState.On)
|
||||
.scrollBar(BarState.Off)
|
||||
.onScroll(() => {
|
||||
let accuracy = 0.1
|
||||
let newOpacity = this.mScroller.currentOffset().xOffset * 1.0 / getIconListSize()
|
||||
|
||||
@@ -45,7 +45,7 @@ export default struct NotificationItem {
|
||||
}
|
||||
}
|
||||
.scrollable(ScrollDirection.Horizontal)
|
||||
.scrollBar(BarState.On)
|
||||
.scrollBar(BarState.Off)
|
||||
.onScroll(() => {
|
||||
let accuracy = 0.1
|
||||
let newOpacity = this.mScroller.currentOffset().xOffset * 1.0 / getIconListSize()
|
||||
|
||||
@@ -22,6 +22,7 @@ const TAG = 'ScreenLock-Wallpaper'
|
||||
@Component
|
||||
export default struct Wallpaper {
|
||||
@State mViewModel: ViewModel = new ViewModel()
|
||||
@StorageLink('isWallpaperShow') isWallpaperShow: boolean = true
|
||||
|
||||
aboutToAppear() {
|
||||
Log.showInfo(TAG, "aboutToAppear")
|
||||
@@ -34,10 +35,12 @@ export default struct Wallpaper {
|
||||
}
|
||||
|
||||
build() {
|
||||
Image(this.mViewModel.getWallpaperData())
|
||||
.width(Constants.FULL_CONTAINER_WIDTH)
|
||||
.height(Constants.FULL_CONTAINER_HEIGHT)
|
||||
.objectFit(ImageFit.Cover)
|
||||
.hoverEffect(HoverEffect.None)
|
||||
if (this.isWallpaperShow === true) {
|
||||
Image(this.mViewModel.getWallpaperData())
|
||||
.width(Constants.FULL_CONTAINER_WIDTH)
|
||||
.height(Constants.FULL_CONTAINER_HEIGHT)
|
||||
.objectFit(ImageFit.Cover)
|
||||
.hoverEffect(HoverEffect.None)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AbilityStage from "@ohos.application.AbilityStage"
|
||||
import AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
import Log from '../../../../../../common/src/main/ets/default/Log'
|
||||
|
||||
const TAG = "ScreenLock-MainAbilityStage"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import ServiceExtension from '@ohos.application.ServiceExtensionAbility'
|
||||
import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility'
|
||||
import windowManager from '@ohos.window'
|
||||
import WindowManagers, { WindowType } from "../../../../../../common/src/main/ets/default/WindowManager";
|
||||
import display from '@ohos.display'
|
||||
|
||||
@@ -57,9 +57,7 @@ export default struct SlideScreenlock {
|
||||
build() {
|
||||
Stack({ alignContent: Alignment.Bottom }) {
|
||||
Column() {
|
||||
if (this.isWallpaperShow === true) {
|
||||
Wallpaper()
|
||||
}
|
||||
Wallpaper()
|
||||
}
|
||||
.backgroundColor($r('app.color.screenlock_backgroundcolor'))
|
||||
.width(Constants.FULL_CONTAINER_WIDTH)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AbilityStage from "@ohos.application.AbilityStage"
|
||||
import AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import ServiceExtension from '@ohos.application.ServiceExtensionAbility'
|
||||
import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility'
|
||||
import windowManager from '@ohos.window'
|
||||
import display from '@ohos.display'
|
||||
import Log from '../../../../../../common/src/main/ets/default/Log'
|
||||
|
||||
@@ -54,9 +54,7 @@ export default struct SlideScreenlock {
|
||||
build() {
|
||||
Stack({ alignContent: Alignment.Bottom }) {
|
||||
Column() {
|
||||
if (this.isWallpaperShow === true) {
|
||||
Wallpaper()
|
||||
}
|
||||
Wallpaper()
|
||||
}
|
||||
.backgroundColor($r('app.color.screenlock_backgroundcolor'))
|
||||
.width(Constants.FULL_CONTAINER_WIDTH)
|
||||
|
||||
Reference in New Issue
Block a user