1.delete useless page TestMemoryCachePage
Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
parent
e060f02f8e
commit
8e96a8da20
|
@ -111,7 +111,6 @@
|
||||||
"pages/basicTestResourceManagerPage",
|
"pages/basicTestResourceManagerPage",
|
||||||
"pages/storageTestLruCache",
|
"pages/storageTestLruCache",
|
||||||
"pages/storageTestDiskLruCache",
|
"pages/storageTestDiskLruCache",
|
||||||
"pages/testMemoryCachePage",
|
|
||||||
"pages/transformTestCasePage",
|
"pages/transformTestCasePage",
|
||||||
"pages/pngjTestCasePage",
|
"pages/pngjTestCasePage",
|
||||||
"pages/testAllTypeGlideImagePage",
|
"pages/testAllTypeGlideImagePage",
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in New Issue