I am using this solution and it is started listening but after this it is stops scrolling here is my fragment code look at this

class ImageFragment : Fragment(), GestureDetector.OnGestureListener {
lateinit var binding: FragmentImageBinding
private lateinit var gestureDetector: GestureDetector

override fun onCreateView(
    inflater: LayoutInflater, container: ViewGroup?,
    savedInstanceState: Bundle?
): View {
    // Inflate the layout for this fragment
    binding = DataBindingUtil.inflate(layoutInflater, R.layout.fragment_image, container, false)

    val imageList = listOf(
        R.drawable.best_place,
        R.drawable.best_sensei,
        R.drawable.ghost_of_uchiha,
        R.drawable.gojo,
        R.drawable.kakashi,
        R.drawable.obito
    )

    val adapter = ViewPagerAdapter(imageList)
    binding.viewpager2.adapter = adapter

    // Initialize GestureDetector
    gestureDetector = GestureDetector(requireContext(), this@ImageFragment)

    // Set onTouchListener to the view
    binding.viewpager2.getChildAt(binding.viewpager2.currentItem).setOnTouchListener { _, event ->
        gestureDetector.onTouchEvent(event)
        true
    }

    return binding.root
}

override fun onDown(e: MotionEvent): Boolean {
    Toast.makeText(requireContext(), "Down", Toast.LENGTH_SHORT).show()
    Log.e("Test","Scroll Down")
    return true
}

override fun onShowPress(e: MotionEvent) {
    Toast.makeText(requireContext(), "Down", Toast.LENGTH_SHORT).show()
    Log.e("Test","Show Press")
}

override fun onSingleTapUp(e: MotionEvent): Boolean {
    Toast.makeText(requireContext(), "Single Tap", Toast.LENGTH_SHORT).show()
    Log.e("Test","Single Tap")
    return true
}

override fun onScroll(
    e1: MotionEvent?,
    e2: MotionEvent,
    distanceX: Float,
    distanceY: Float
): Boolean {
    Toast.makeText(requireContext(), "Scroll", Toast.LENGTH_SHORT).show()
    Log.e("Test","Scroll Done")
    return true
}

override fun onLongPress(e: MotionEvent) {
    Toast.makeText(requireContext(), "Long Press", Toast.LENGTH_SHORT).show()
    Log.e("Test","Long Press")
}

override fun onFling(
    e1: MotionEvent?,
    e2: MotionEvent,
    velocityX: Float,
    velocityY: Float
): Boolean {
    Toast.makeText(requireContext(), "Fling", Toast.LENGTH_SHORT).show()
    Log.e("Test","Fling Fling")
    return true
}

I have created view pager scrolling using Viewpager2 it is being swipe but i want to listen swipe gestures like when user swipe up delete that item from list and when user long press on that item of view pager transit to second fragment but after i done this code it is listening but not swiping so tell me why and please explain in details