private void setPageOffset(Object value) { if (verticalLayout) { TiCompositeLayout.LayoutParams params = (LayoutParams) mPager.getLayoutParams(); params.optionHeight = TiConvert.toTiDimension(TiConvert.toString(value), TiDimension.TYPE_TOP); mPager.setLayoutParams(params); } else { TiCompositeLayout.LayoutParams params = (LayoutParams) mPager.getLayoutParams(); params.optionWidth = TiConvert.toTiDimension(TiConvert.toString(value), TiDimension.TYPE_LEFT); mPager.setLayoutParams(params); } }
private void setPageWidth(Object value) { if (verticalLayout) { TiCompositeLayout.LayoutParams params = (LayoutParams) mPager.getLayoutParams(); params.optionHeight = TiConvert.toTiDimension(TiConvert.toString(value), TiDimension.TYPE_HEIGHT); mPager.setLayoutParams(params); } else { TiCompositeLayout.LayoutParams params = (LayoutParams) mPager.getLayoutParams(); params.optionWidth = TiConvert.toTiDimension(TiConvert.toString(value), TiDimension.TYPE_WIDTH); mPager.setLayoutParams(params); } ((ViewGroup) nativeView).setClipChildren(false); hardwaredDisabled = true; disableHWAcceleration(nativeView); // we ll reenable it later because of a glitch }