diff --git a/entry/src/main/config.json b/entry/src/main/config.json index a0f0190..f9ae741 100644 --- a/entry/src/main/config.json +++ b/entry/src/main/config.json @@ -111,7 +111,6 @@ "pages/basicTestResourceManagerPage", "pages/storageTestLruCache", "pages/storageTestDiskLruCache", - "pages/testMemoryCachePage", "pages/transformTestCasePage", "pages/pngjTestCasePage", "pages/testAllTypeGlideImagePage", diff --git a/entry/src/main/ets/MainAbility/pages/testMemoryCachePage.ets b/entry/src/main/ets/MainAbility/pages/testMemoryCachePage.ets deleted file mode 100644 index 54dc6d6..0000000 --- a/entry/src/main/ets/MainAbility/pages/testMemoryCachePage.ets +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import resourceManager from '@ohos.resourceManager'; -import util from '@ohos.util'; -import {RequestOption} from "../glide/RequestOption" -//import {Glide} from '../glide/Glide' -import{ALL} from "../cache/diskstrategy/enum/ALL" -import{NONE} from "../cache/diskstrategy/enum/NONE" -import {AsyncCallback} from "../glide/interface/asynccallback" -import {AsyncSuccess} from "../glide/interface/AsyncSuccess" - - -@Entry -@Component -struct TestMemoryCachePage { - @State tomatoPixelMap: PixelMap = new PixelMap(); - @State tomatoPixelMap2: PixelMap = new PixelMap(); - @State iceCreamPixelMap: PixelMap = new PixelMap(); - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Image(this.tomatoPixelMap) - .width(200) - .height(200) - .objectFit(ImageFit.Contain) - .backgroundColor(Color.Green) - .onClick(() => { - }) - Image(this.iceCreamPixelMap) - .backgroundColor(Color.Grey) - .objectFit(ImageFit.Contain) - .width(200) - .height(200) - Image(this.tomatoPixelMap2) - .objectFit(ImageFit.Contain) - .backgroundColor(Color.Orange) - .width(200) - .height(200) - } - .width('100%') - .height('100%') - } - - aboutToAppear() { - console.log("aboutToAppear()") - this.testAllResourceLoading(); - } - - private testAllResourceLoading() { - - let glideOption = new RequestOption(); - glideOption.load($r('app.media.Tomato')) - .addListener((err, data) => { - console.log("glide1 图片1 赋值!") - this.tomatoPixelMap = data.glideValue as PixelMap; - return false; - }) - - Glide.call(glideOption); - - - let glideOption2 = new RequestOption(); - glideOption2.load($r('app.media.IceCream')) - .addListener((err, data) => { - this.iceCreamPixelMap = data.glideValue as PixelMap; - console.log("glide2 图片2 赋值!") - return false; - }) - - Glide.call(glideOption2); - - - let glideOption3 = new RequestOption(); - glideOption3.load($r('app.media.Tomato')) - .addListener((err, data) => { - this.tomatoPixelMap2 = data.glideValue as PixelMap; - console.log("glide3 图片1 赋值!") - return false; - }) - - Glide.call(glideOption3); - } -} - - -var Glide = globalThis.exports.default.data.glide \ No newline at end of file