请问下,weex的组件高度是必须要设置吗?我如果设置全屏的话,这里该怎么设置,总不能设置一个固定值吧?还有就是,我想动态更新布局高度,怎么设置上去后不会更新呢,貌似方法没对,应该怎么设置呢?
动态更新宽高代码:
height = DomUtils.computerComponentMaxHeight(this, height);
width = DomUtils.computerComponentMaxWidth(this, width);
height = DomUtils.computerComponentMaxHeight(this, height);
WXDomObject domObject = (WXDomObject) getDomObject();
domObject.setLayoutHeight(height);
domObject.setLayoutWidth(width);
domObject.setStyleHeight(height);
domObject.setStyleWidth(width);
updateDom(domObject);
weex.config.env
里可以获取设备的高度