android: add BlurEffectView

This commit is contained in:
pengfei.zhou
2021-11-24 14:37:48 +08:00
committed by osborn
parent 040823a8af
commit d24e0ecff6
18 changed files with 2280 additions and 1768 deletions

View File

@@ -0,0 +1,39 @@
import {
VLayout,
Group,
Panel,
jsx,
layoutConfig,
BlurEffect,
Image,
Text,
createRef,
animate,
loge,
Stack,
RotationXAnimation,
RotationAnimation,
} from "doric";
@Entry
export class BlurEffectsDemo extends Panel {
build(root: Group) {
let ref = createRef<Image>();
<VLayout layoutConfig={layoutConfig().most()} parent={root}>
<BlurEffect layoutConfig={layoutConfig().most()} radius={15}>
<Image
ref={ref}
imageUrl="https://pic3.zhimg.com/v2-5847d0813bd0deba333fcbe52435e83e_b.jpg"
onClick={async () => {
const rotation = new RotationAnimation();
rotation.fromRotation = 0;
rotation.toRotation = 2;
rotation.duration = 1000;
rotation.repeatCount = -1;
ref.current.doAnimation(context, rotation);
}}
/>
</BlurEffect>
</VLayout>;
}
}