weex 组件高度问题?

请问下,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);
阅读 4k
1 个回答

weex.config.env里可以获取设备的高度

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进