0
我正在使用「me.everything:overscroll-decor-android:1.0.4」。 我可以從圖像視圖獲取偏移值,我試圖向下滑動? 文檔說明
OverScrollDecoratorHelper.setUpStaticOverScroll(view,OverScrollDecoratorHelper.ORIENTATION_VERTICAL); 我的代碼是OverScrollDecoratorHelper從視圖獲取onOverScrollUpdate回調
@BindView(R.id.swipeDownImgV)
ImageView swipeDownImgV;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.no_orders_fragment, container, false);
ButterKnife.bind(this, view);
setUpSwipeListener();
return view;
}
private void setUpSwipeListener() {
OverScrollDecoratorHelper.setUpStaticOverScroll(swipeDownImgV, OverScrollDecoratorHelper.ORIENTATION_VERTICAL)
.setOverScrollUpdateListener(new IOverScrollUpdateListener() {
@Override
public void onOverScrollUpdate(IOverScrollDecor decor, int state, float offset) {
Log.d(Tag.SWIPE, offset + " offset");
}
});
但它沒有效果,我做錯了什麼?謝謝!