Exemplo n.º 1
0
 public void onScrollChanged(int l, int t, int oldl, int oldt) {
   if (callbackProcs != null && callbackProcs[CB_SCROLL_CHANGED] != null) {
     super.onScrollChanged(l, t, oldl, oldt);
     Script.callMethod(callbackProcs[CB_SCROLL_CHANGED], "call", new Object[] {l, t, oldl, oldt});
   } else {
     super.onScrollChanged(l, t, oldl, oldt);
   }
 }
Exemplo n.º 2
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   if (mCallbacks != null) {
     mCallbacks.onScrollChanged(t);
   }
 }
Exemplo n.º 3
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   if (listener != null) {
     listener.onScrollChanged(this, l, t, oldl, oldt);
   }
 }
 @Override
 protected void onScrollChanged(int x, int y, int oldX, int oldY) {
   super.onScrollChanged(x, y, oldX, oldY);
   if (scrollListener != null) {
     scrollListener.onScrollChanged(x, y);
   }
 }
Exemplo n.º 5
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    boolean stop = false;
    if (Scroll_height - view_height == t) {
      stop = true;
    }

    if (t == 0 || stop == true) {
      try {
        if (scrollView_mScroller == null) {
          scrollView_mScroller = getDeclaredField(this, "mScroller");
        }

        Object ob = scrollView_mScroller.get(this);
        if (ob == null || !(ob instanceof Scroller)) {
          return;
        }
        Scroller sc = (Scroller) ob;
        sc.abortAnimation();

      } catch (Exception e) {
        Log.e(TAG, e.getMessage());
      }
    }
    super.onScrollChanged(l, t, oldl, oldt);
  }
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   for (Callbacks c : mCallbacks) {
     c.onScrollChanged(l - oldl, t - oldt);
   }
 }
Exemplo n.º 7
0
 @Override
 protected void onScrollChanged(int x, int y, int oldx, int oldy) {
   super.onScrollChanged(x, y, oldx, oldy);
   if (onScrollListener != null) {
     onScrollListener.onScroll(x, y, oldx, oldy);
   }
 }
Exemplo n.º 8
0
 @Override
 protected void onScrollChanged(int x, int y, int oldx, int oldy) {
   super.onScrollChanged(x, y, oldx, oldy);
   if (scroviewListener != null) {
     scroviewListener.onScrollChanged(this, x, y, oldx, oldy);
   }
 }
Exemplo n.º 9
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   int amountScroll = t - oldt;
   if (mOnScrollCallback != null) {
     mOnScrollCallback.onScroll(-amountScroll);
   }
 }
Exemplo n.º 10
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    super.onScrollChanged(l, t, oldl, oldt);

    if (getScrollY() == 0) {
      isTop = true;
    }
  }
Exemplo n.º 11
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    super.onScrollChanged(l, t, oldl, oldt);

    Logx.d("scrollBy x:" + l + " y:" + t);
    if (onScrollListener != null) {
      onScrollListener.onScroll(l, t);
    }
  }
    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
      super.onScrollChanged(l, t, oldl, oldt);

      KrollDict data = new KrollDict();
      data.put("x", l);
      data.put("y", t);
      getProxy().fireEvent("scroll", data);
    }
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    super.onScrollChanged(l, t, oldl, oldt);

    View view = (View) getChildAt(getChildCount() - 1);
    int diff = (view.getBottom() - getHeight() - getScrollY());
    if (diff <= 0) {
      this.welcomePagerAdapter.activateAcceptButton();
    }
  }
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   // 滚动时回调
   if (mCallbacks != null && mCallbacks.size() != 0) {
     for (Callbacks item : mCallbacks) {
       item.onScrollChanged();
     }
   }
 }
Exemplo n.º 15
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    super.onScrollChanged(l, t, oldl, oldt);

    if (scrollInterface == null || !listenerEnabled) return;

    if (Math.abs(lastY - t) > 100) {
      lastY = t;
      scrollInterface.onScrollChanged(l, t, oldl, oldt);
    }
  }
Exemplo n.º 16
0
  @Override
  protected void onScrollChanged(int x, int y, int oldx, int oldy) {
    super.onScrollChanged(x, y, oldx, oldy);
    //
    //        if (y - oldy > 50) {
    //            getContext().sendBroadcast(new Intent(BaseListView.UPSLIDE));
    //        } else if (y - oldy < -20) {
    //            getContext().sendBroadcast(new Intent(BaseListView.DOWNSLIDE));
    //        }

  }
Exemplo n.º 17
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   int hilightIndex = 0;
   hilightIndex = (t + getMeasuredHeight() / 2) / 80;
   for (int i = 0; i < linearLayout.getChildCount(); i++) {
     TextView tv = (TextView) linearLayout.getChildAt(i);
     if (i == hilightIndex) {
       tv.setTextSize(30);
     } else {
       tv.setTextSize(22);
     }
   }
 }
 /**
  * 这个是设置向上滑动时,上半部分View滑动速度让其小于下半部分
  *
  * @param l
  * @param t
  * @param oldl
  * @param oldt
  */
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   mCurrentOffset = t; // 右边滑动标签相对于顶端的偏移量
   Log.e("OFFSET", "onScrollChanged=" + mCurrentOffset);
   // 当手势上滑,则右侧滚动条下滑,下滑的高度小于TopView的高度,则让TopView的上滑速度小于DownView的上滑速度
   // DownView的上滑速度是滚动条的速度,也就是滚动的距离是右侧滚动条的距离
   // 则TopView的速度要小,只需要将右侧滚动条的偏移量也就是t缩小一定倍数就行了。我这里除以2速度减小1倍
   if (t <= mTopViewHeight && t >= 0 && !isBig) {
     mTopView.setTranslationY(t / 2); // 使得TopView滑动的速度小于滚轮滚动的速度
   }
   if (isBig) {
     scrollTo(0, 0);
   }
 }
Exemplo n.º 19
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    // Grab the last child placed in the ScrollView, we need it to determinate the bottom position.
    View view = getChildAt(getChildCount() - 1);
    if (null != view) {
      // Calculate the scroll diff
      int diff = (view.getBottom() - (view.getHeight() + view.getScrollY()));

      // if diff is zero, then the bottom has been reached
      if (diff == 0 && mEnableAutoLoad) {
        // notify that we have reached the bottom
        startLoadMore();
      }
    }
    super.onScrollChanged(l, t, oldl, oldt);
  }
Exemplo n.º 20
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    // Grab the last child placed in the ScrollView, we need it to determinate the bottom position.
    View view = getChildAt(getChildCount() - 1);

    // Calculate the scrolldiff
    int diff = (view.getBottom() - (getHeight() + getScrollY()));

    if (diff == 0) {
      if (bottomListener != null) {
        bottomListener.OnScrollToBottom();
      }
    }

    super.onScrollChanged(l, t, oldl, oldt);
    this.onScrollToBottom();
  }
	@Override
	protected void onScrollChanged(int l, int t, int oldl, int oldt) {
		super.onScrollChanged(l, t, oldl, oldt);

		if (mApplyResistance) {
			// Simulate resistance on the pull down.
			// We have to round the result because otherwise we would never reach the end.
			// Vary the resistance depending on how close we are to the top.
			// We need to set the mApplyResistance to false before scrolling again, otherwise
			// we would get an overflow of recursive calls.
			mApplyResistance = false;
			int changeY = t - oldt;
			int headerBottom = mHeaderContainer.getBottom();
			float resistance = (mResistance * (headerBottom - t) / headerBottom) + 1;
			int newChangeY = (int) (changeY / (resistance * resistance));
			int newt = oldt + newChangeY;
			scrollTo(0, newt);
		}
	}
Exemplo n.º 22
0
  @Override
  protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    // 首次使用获取banner初始高度和宽度
    if (originHeight == -1 || originWidth == -1) {
      originHeight = mTopView.getHeight();
      originWidth = mTopView.getWidth();
    }

    // t为ScrollView向上滑动的量, 两者相减即为当前banner所需的高度
    int height = originHeight - t;
    // 计算缩放比例
    float newRatio = (float) height / (float) originHeight;

    // 修改banner的属性
    if (height >= 0) {
      ViewHelper.setScaleX(mTopView, newRatio);
      ViewHelper.setScaleY(mTopView, newRatio);
      ViewHelper.setY(mTopView, t / 2);
      ViewHelper.setAlpha(mTopView, newRatio);
    }
    super.onScrollChanged(l, t, oldl, oldt);
  }
 protected void onScrollChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
   super.onScrollChanged(paramInt1, paramInt2, paramInt3, paramInt4);
   if (this.scrollViewListener == null) return;
   this.scrollViewListener.onScrollChanged(this, paramInt1, paramInt2, paramInt3, paramInt4);
 }
Exemplo n.º 24
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   progressUpdate();
 }
 @Override
 protected void onScrollChanged(int x, int y, int oldx, int oldy) {
   super.onScrollChanged(x, y, oldx, oldy);
   doOnBorderListener();
 }
Exemplo n.º 26
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   if (scrollViewListener != null) scrollViewListener.onViewScroll(l, t, oldl, oldt);
 }
Exemplo n.º 27
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   listener.onScrollChanged(l, t, oldl, oldt);
 }