com.alibaba.weex.commons.util.ScreenUtil Java Examples

The following examples show how to use com.alibaba.weex.commons.util.ScreenUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractWeexActivity.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 5 votes vote down vote up
protected void renderPage(String template,String source,String jsonInitData){
  AssertUtil.throwIfNull(mContainer,new RuntimeException("Can't render page, container is null"));
  Map<String, Object> options = new HashMap<>();
  options.put(WXSDKInstance.BUNDLE_URL, source);
  mInstance.render(
    source,
    template,
    options,
    jsonInitData,
    ScreenUtil.getDisplayWidth(this),
    ScreenUtil.getDisplayHeight(this),
    WXRenderStrategy.APPEND_ASYNC);
}
 
Example #2
Source File: AbstractWeexActivity.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 5 votes vote down vote up
protected void renderPageByURL(String url,String jsonInitData){
  AssertUtil.throwIfNull(mContainer,new RuntimeException("Can't render page, container is null"));
  Map<String, Object> options = new HashMap<>();
  options.put(WXSDKInstance.BUNDLE_URL, url);
  mInstance.renderByUrl(
    getPageName(),
    url,
    options,
    jsonInitData,
    ScreenUtil.getDisplayWidth(this),
    ScreenUtil.getDisplayHeight(this),
    WXRenderStrategy.APPEND_ASYNC);
}
 
Example #3
Source File: AbsWeexActivity.java    From WeexOne with MIT License 5 votes vote down vote up
protected void renderPageByURL(String url, String jsonInitData) {
  AssertUtil.throwIfNull(mContainer, new RuntimeException("Can't render page, container is null"));
  Map<String, Object> options = new HashMap<>();
  options.put(WXSDKInstance.BUNDLE_URL, url);
  mInstance.renderByUrl(
      getPageName(),
      url,
      options,
      jsonInitData,
      ScreenUtil.getDisplayWidth(this),
      ScreenUtil.getDisplayHeight(this),
      WXRenderStrategy.APPEND_ASYNC);
}
 
Example #4
Source File: AbstractWeexActivity.java    From weex with Apache License 2.0 5 votes vote down vote up
protected void renderPage(String template,String source,String jsonInitData){
  AssertUtil.throwIfNull(mContainer,new RuntimeException("Can't render page, container is null"));
  Map<String, Object> options = new HashMap<>();
  options.put(WXSDKInstance.BUNDLE_URL, source);
  mInstance.render(
    getPageName(),
    template,
    options,
    jsonInitData,
    ScreenUtil.getDisplayWidth(this),
    ScreenUtil.getDisplayHeight(this),
    WXRenderStrategy.APPEND_ASYNC);
}
 
Example #5
Source File: AbstractWeexActivity.java    From weex with Apache License 2.0 5 votes vote down vote up
protected void renderPageByURL(String url,String jsonInitData){
  AssertUtil.throwIfNull(mContainer,new RuntimeException("Can't render page, container is null"));
  Map<String, Object> options = new HashMap<>();
  options.put(WXSDKInstance.BUNDLE_URL, url);
  mInstance.renderByUrl(
    getPageName(),
    url,
    options,
    jsonInitData,
    ScreenUtil.getDisplayWidth(this),
    ScreenUtil.getDisplayHeight(this),
    WXRenderStrategy.APPEND_ASYNC);
}