As titled, i am looking for an event that detects that the nestedscrollview reached the bottom of the layout.
Asked
Active
Viewed 193 times
2
-
1Check http://stackoverflow.com/questions/36143802/how-to-detect-the-position-of-the-scroll-nestedscrollview-android-at-the-bottom Set OnScrollChangeListener to your NestedScrollView. – EugenUngurean Feb 21 '17 at 09:23
-
Are you using C# or Java? – Nemus Feb 21 '17 at 09:25
-
@Nemus I use C# – Andreas Constantinou Feb 21 '17 at 09:28
-
2Possible duplicate of [how to detect the position of the scroll nestedscrollview android at the bottom?](http://stackoverflow.com/questions/36143802/how-to-detect-the-position-of-the-scroll-nestedscrollview-android-at-the-bottom) – rishit_s Feb 21 '17 at 09:30
-
@rishit_s thats what EugenUngurean suggested but i am looking for something better – Andreas Constantinou Feb 21 '17 at 09:35
1 Answers
1
Found my solution based on the links @EugenUngurean and @rishit_s commented. Thank you very much guys.
Basically i inherited IOnScrollChangeListener.
public class EventFragment : MvxCachingFragmentCompatActivity<EventInfoViewModel>, IOnScrollChangeListener
Then create a NestedScrollView OnScrollListener and finished it with the interface of the listener. BottomSheet.SetOnScrollChangeListener(this);
public void OnScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY)
{
if (scrollY == (v.GetChildAt(0).MeasuredHeight - v.MeasuredHeight))
{
SwitchToEventInfo(true);
}
else if (scrollY == 0)
{
SwitchToEventInfo(false);
}
}

Andreas Constantinou
- 104
- 8