Java Code Examples for com.taobao.weex.utils.WXViewUtils#getWeexHeight()
The following examples show how to use
com.taobao.weex.utils.WXViewUtils#getWeexHeight() .
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: WXScroller.java From ucar-weex-core with Apache License 2.0 | 6 votes |
@Override protected MeasureOutput measure(int width, int height) { MeasureOutput measureOutput = new MeasureOutput(); if (this.mOrientation == Constants.Orientation.HORIZONTAL) { int screenW = WXViewUtils.getScreenWidth(WXEnvironment.sApplication); int weexW = WXViewUtils.getWeexWidth(getInstanceId()); measureOutput.width = width > (weexW >= screenW ? screenW : weexW) ? FrameLayout.LayoutParams.MATCH_PARENT : width; measureOutput.height = height; } else { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(getInstanceId()); measureOutput.height = height > (weexH >= screenH ? screenH : weexH) ? FrameLayout.LayoutParams.MATCH_PARENT : height; measureOutput.width = width; } return measureOutput; }
Example 2
Source File: WXScroller.java From weex-uikit with MIT License | 6 votes |
@Override protected MeasureOutput measure(int width, int height) { MeasureOutput measureOutput = new MeasureOutput(); if (this.mOrientation == Constants.Orientation.HORIZONTAL) { int screenW = WXViewUtils.getScreenWidth(WXEnvironment.sApplication); int weexW = WXViewUtils.getWeexWidth(getInstanceId()); measureOutput.width = width > (weexW >= screenW ? screenW : weexW) ? FrameLayout.LayoutParams.MATCH_PARENT : width; measureOutput.height = height; } else { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(getInstanceId()); measureOutput.height = height > (weexH >= screenH ? screenH : weexH) ? FrameLayout.LayoutParams.MATCH_PARENT : height; measureOutput.width = width; } return measureOutput; }
Example 3
Source File: WXScroller.java From weex with Apache License 2.0 | 6 votes |
@Override protected MeasureOutput measure(int width, int height) { MeasureOutput measureOutput = new MeasureOutput(); if (this.mOrientation == WXVContainer.HORIZONTAL) { int screenW = WXViewUtils.getScreenWidth(WXEnvironment.sApplication); int weexW = WXViewUtils.getWeexWidth(mInstanceId); measureOutput.width = width > (weexW >= screenW ? screenW : weexW) ? FrameLayout.LayoutParams.MATCH_PARENT : width; measureOutput.height = height; } else { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(mInstanceId); measureOutput.height = height > (weexH >= screenH ? screenH : weexH) ? FrameLayout.LayoutParams.MATCH_PARENT : height; measureOutput.width = width; } return measureOutput; }
Example 4
Source File: BasicListComponent.java From ucar-weex-core with Apache License 2.0 | 5 votes |
/** * Measure the size of the recyclerView. * * @param width the expected width * @param height the expected height * @return the result of measurement */ @Override protected MeasureOutput measure(int width, int height) { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(getInstanceId()); int outHeight = height > (weexH >= screenH ? screenH : weexH) ? weexH - getAbsoluteY() : height; return super.measure((int)(width+mColumnGap), outHeight); }
Example 5
Source File: BasicListComponent.java From weex-uikit with MIT License | 5 votes |
/** * Measure the size of the recyclerView. * * @param width the expected width * @param height the expected height * @return the result of measurement */ @Override protected MeasureOutput measure(int width, int height) { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(getInstanceId()); int outHeight = height > (weexH >= screenH ? screenH : weexH) ? weexH - getAbsoluteY() : height; return super.measure(width, outHeight); }
Example 6
Source File: WXListComponent.java From weex with Apache License 2.0 | 5 votes |
/** * Measure the size of the recyclerView. * * @param width the expected width * @param height the expected height * @return the result of measurement */ @Override protected MeasureOutput measure(int width, int height) { int screenH = WXViewUtils.getScreenHeight(WXEnvironment.sApplication); int weexH = WXViewUtils.getWeexHeight(mInstanceId); int outHeight = height > (weexH >= screenH ? screenH : weexH) ? weexH - mAbsoluteY : height; return super.measure(width, outHeight); }