Scroller 不显示其余的 listView 内容

Scroller does not show the rest of listView content

我使用了这个 link 中的 bounceScroller 库:https://github.com/coderkiss/BounceScroller

我的布局有这样的结构:

 <FrameLayout>
         <me.dawson.bounce.BounceScroller>
             <ListView>
             </ListView>
         </me.dawson.bounce.BounceScroller>
    </frameLayout>

我使用弹跳滚动条将弹跳设置为列表视图,就像 ios 的默认设置一样 (只是滚动中的边缘)

它是有效的,但是当我长按并移动弹跳滚动条时,列表视图停止滚动并显示页眉和页脚。

我的布局代码是:

  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
        android:layout_height="match_parent" tools:context="android.blaaaaaa.com.bla.Home_fra">

        <!-- TODO: Update blank fragment layout -->
        <me.dawson.bounce.BounceScroller xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/pc_root"
            android:layout_width="match_parent"
            android:layout_height="match_parent"

            android:background="@android:color/transparent" >
       <ListView

           android:scrollbars="none"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:id="@+id/main_list_view"
           android:paddingLeft="5dp"
           android:overScrollMode="never"
           android:listSelector="@android:color/transparent"
           android:paddingRight="5dp"
           android:paddingBottom="10dp"></ListView>

        </me.dawson.bounce.BounceScroller>
    </FrameLayout>

我的class代码:

   View rootView = inflater.inflate(R.layout.fragment_home_fra, container, false);

        final ListView Main_List_View = (ListView) rootView.findViewById(R.id.main_list_view);
        main_adapter = new Mian_list_adapter(getActivity() , 0 ,main_title , main_rest);
        Main_List_View.setAdapter(main_adapter);


        scroller = (BounceScroller) rootView.findViewById(R.id.pc_root);
        scroller.requestDisallowInterceptTouchEvent(true);
        scroller.setListener(bl).enableHeader(true).enableFooter(true); 

您不能将 ListView 放在 ScrollView 中并期望它正常工作。 ListView 已经有了原生滚动,所以放入 ScrollView 会把它搞砸。

如果你想实现ListViews的弹性滚动,你应该搜索其他方法,比如this lib