One way to solve this problem is to copy the same view outside the scroll bar and keep it hidden. Just to make it visible when the old button looks again.
@Override public void onScrollChanged(ObservableScrollView scrollView, int x, int y, int oldx, int oldy) { Rect scrollBounds = new Rect(); scrollView.getHitRect(scrollBounds); if (mPriceBtn.getLocalVisibleRect(scrollBounds)) {
user2138983
source share