From 3d3f64684500f7f1c1d08f9efae8a60b02a84bc2 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Mon, 13 Sep 2021 13:30:22 +0800 Subject: [PATCH] add timer demo --- doric-demo/src/TSXDemo.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doric-demo/src/TSXDemo.tsx b/doric-demo/src/TSXDemo.tsx index e5c650fe..69792d71 100644 --- a/doric-demo/src/TSXDemo.tsx +++ b/doric-demo/src/TSXDemo.tsx @@ -9,12 +9,19 @@ import { Text, createRef, Color, - loge, + statusbar, + navbar, } from "doric"; @Entry -class Counter extends Panel { +class Timer extends Panel { + onShow() { + navbar(this.context).setHidden(true); + statusbar(this.context).setHidden(true); + } + build(root: Group) { + statusbar(this.context).setHidden(true); root.backgroundColor = Color.BLACK; const hour1Ref = createRef(); const hour2Ref = createRef(); @@ -36,7 +43,6 @@ class Counter extends Panel { textSize={40} ref={hour1Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -45,7 +51,6 @@ class Counter extends Panel { textSize={40} ref={hour2Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -62,7 +67,6 @@ class Counter extends Panel { textSize={40} ref={min1Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -71,7 +75,6 @@ class Counter extends Panel { textSize={40} ref={min2Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -88,7 +91,6 @@ class Counter extends Panel { textSize={40} ref={sec1Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -97,7 +99,6 @@ class Counter extends Panel { textSize={40} ref={sec2Ref} textColor={Color.WHITE} - border={{ width: 1, color: Color.BLUE }} padding={{ left: 10, right: 10, top: 10, bottom: 10 }} > 0 @@ -118,7 +119,6 @@ class Counter extends Panel { sec2Ref, ].forEach((e) => { e.current.apply({ - border: undefined, textSize: width / 10, }); });