how to detect the position of the scroll nestedscrollview android at the bottom?

后端 未结 7 995
不知归路
不知归路 2020-12-04 22:19

i just want to detect the position of the scroll nestedscrollview android at the bottom, and the to call function. my code is :

scroll.getViewTreeObserver()
         


        
7条回答
  •  旧巷少年郎
    2020-12-04 22:30

    Webserveis answered right, but the condition should be like this

     if (scrollY == (v?.getChildAt(0)?.measuredHeight ?: 0) - (v?.measuredHeight ?: 0)) {
        //at bottom
        }
    

提交回复
热议问题