android:fix DoricPanel cannot build automaticaly
This commit is contained in:
parent
3bbf671420
commit
9c520e1dc5
@ -66,7 +66,7 @@ public class DoricPanel extends FrameLayout implements LifecycleObserver {
|
|||||||
public void config(DoricContext doricContext) {
|
public void config(DoricContext doricContext) {
|
||||||
mDoricContext = doricContext;
|
mDoricContext = doricContext;
|
||||||
mDoricContext.getRootNode().setRootView(this);
|
mDoricContext.getRootNode().setRootView(this);
|
||||||
if (getMeasuredWidth() != 0 && getMeasuredHeight() != 0) {
|
if (getMeasuredWidth() != 0 || getMeasuredHeight() != 0) {
|
||||||
mDoricContext.build(DoricUtils.px2dp(getMeasuredWidth()), DoricUtils.px2dp(getMeasuredHeight()));
|
mDoricContext.build(DoricUtils.px2dp(getMeasuredWidth()), DoricUtils.px2dp(getMeasuredHeight()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user