getScrollY() is actually a method on View, not ListView. It is referring to the scroll amount of the entire view, so it will almost always be 0.
If you want to know how far the ListView’s contents are scrolled, you can use listView.getFirstVisiblePosition();
More Related Contents:
- Parameters of GestureDetectorCompat constructor
- How do I connect to a specific Wi-Fi network in Android programmatically?
- Android: How do I prevent the soft keyboard from pushing my view up?
- Difference between adjustResize and adjustPan in android?
- How do I get the resource id of an image if I know its name? [duplicate]
- get contact info from android contact picker
- Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci
- Android: Rotate image in imageview by an angle
- Add shadow to custom shape on Android
- android: Determine security type of wifi networks in range (without connecting to them)
- Google Places API request denied for Android autocomplete, even with the right api key
- How to add a fast-scroller to the RecyclerView
- MediaRecorder start failed: -38
- Android: Using ObjectAnimator to translate a View with fractional values of the View’s dimension
- Doze mode and foreground service
- Action buttons doesn’t show up on Action Bar? [duplicate]
- Best way to update data with a RecyclerView adapter [duplicate]
- Defining a percentage width for a LinearLayout? [duplicate]
- Android Studio – ADB Error – “…device unauthorized. Please check the confirmation dialog on your device.”
- Jetpack Compose collapsing toolbar
- How can I highlight the table row on click ?
- How can I get a Dialog style activity window to fill the screen?
- TextView with different textSize
- Missing styles. Is the correct theme chosen for this layout?
- Package signatures do not match the previously installed version
- How to copy logcat output to clipboard?
- Creating an android smart app banner
- Android SIP stack – what to use? [closed]
- Using custom simpleCursorAdapter
- Android-Video View in Fullscreen