Remove: Removed custom view that is not needed.

This commit is contained in:
HeCodes2Much
2024-12-01 12:26:59 +00:00
parent fd7c0aed16
commit f91ab64697

View File

@@ -1,35 +0,0 @@
package com.github.droidworksstudio.launcher.view
import android.content.Context
import android.util.AttributeSet
import androidx.core.widget.NestedScrollView
import androidx.recyclerview.widget.RecyclerView
import com.github.droidworksstudio.launcher.listener.ScrollEventListener
class GestureNestedScrollView(context: Context, attrs: AttributeSet) :
NestedScrollView(context, attrs) {
var scrollEventListener: ScrollEventListener? = null
init {
isNestedScrollingEnabled = true
}
fun isTopReached(): Boolean {
return !canScrollVertically(-1)
}
fun isBottomReached(): Boolean {
return !canScrollVertically(1)
}
fun registerRecyclerView(recyclerView: RecyclerView, eventListener: ScrollEventListener) {
scrollEventListener = eventListener
recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
scrollEventListener?.onScroll(isTopReached(), isBottomReached())
}
})
}
}