How can you correctly continue the fling of a ScrollView when adding children?

后端 未结 2 1815
感动是毒
感动是毒 2021-02-13 18:39

Context: I have a ScrollView that may have children added to its content view during a fling. Since the fling is configured with the height of the ScrollView<

2条回答
  •  有刺的猬
    2021-02-13 19:26

    I solved a similar problem with @Override fling method. If you override fling method on your ScrollViewNoFling class and not call super.fling on this method, you gonna have not-fling-handled scrollView.

    @Override
    public void fling (int velocity)
    {
        /*Scroll view is no longer going to handle scroll velocity.
         * super.fling(velocity);
        */
    }
    

提交回复
热议问题