public TiUIScrollableView(ScrollableViewProxy proxy, TiBaseActivity activity) {
    super(proxy);
    //		activity.addConfigurationChangedListener(this);

    mViews = new ArrayList<TiViewProxy>();
    viewsLock = new Object();
    buildViewPager(activity);
    TiCompositeLayout.LayoutParams params = new LayoutParams();
    params.optionWidth = new TiDimension("100%", TiDimension.TYPE_WIDTH);
    params.optionHeight = new TiDimension("100%", TiDimension.TYPE_HEIGHT);
    mPager.setLayoutParams(params);
    mContainer =
        new TiViewPagerLayout(activity) {
          @Override
          public boolean dispatchTouchEvent(MotionEvent event) {
            if (touchPassThrough == true) return false;
            return super.dispatchTouchEvent(event);
          }
        };
    mContainer.addView((View) mPager, params);
    mPagingControl = buildPagingControl(activity);
    mContainer.addView(mPagingControl, buildFillLayoutParams());

    setNativeView(mContainer);
  }
 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
  }