با سلام دوستان
هنگام scroll کردن کرش میکنه برنامه و ارور زیر داده میشه:
main
Process: com.mahdi.rostamipoor.nikestore, PID: 9843
kotlin.NotImplementedError: An operation is not implemented: Not yet implemented
at com.mahdi.rostamipoor.nikestore.activity_frag.PageProduct$onCreate$2$1.onDownMotionEvent(PageProduct.kt:51)
at com.mahdi.rostamipoor.nikestore.scroll.ObservableScrollView.dispatchOnDownMotionEvent(ObservableScrollView.java:250)
at com.mahdi.rostamipoor.nikestore.scroll.ObservableScrollView.onInterceptTouchEvent(ObservableScrollView.java:122)
کد ها:
pic_product.post {
val toolbarHeight=pic_product.height
val toolbar=toolbar_view
val pic=pic_product
observableScrollView.addScrollViewCallbacks(object : ObservableScrollViewCallbacks{
override fun onScrollChanged(
scrollY: Int,
firstScroll: Boolean,
dragging: Boolean
) {
toolbar.alpha=scrollY.toFloat() / toolbarHeight.toFloat()
pic.translationY=scrollY.toFloat() / 2
}
override fun onDownMotionEvent() {
TODO("Not yet implemented")
}
override fun onUpOrCancelMotionEvent(scrollState: ScrollState?) {
TODO("Not yet implemented")
}
})
}