问题描述:

I have searched over this a lot and tried every thing

i added this to the class

translator_list.setOverScrollMode(View.OVER_SCROLL_NEVER);

and this is the layout for the listview

<ListView

android:id="@+id/translator_list"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_below="@+id/search_authrs"

android:divider="@drawable/authors_menu_divider"

android:fadeScrollbars="true"

android:fastScrollAlwaysVisible="false"

android:fastScrollEnabled="true"

android:listSelector="@drawable/sidemenu_selector"

android:paddingRight="40dip"

android:scrollbarStyle="insideOverlay"

android:scrollbars="none" />

But the fast scroll still appears I enabled it cause i have an indexing function for the list and I need fastscroll

It dosen't show in kitkat but any sdk <4.4 it shows this big grey square

![Like this image] http://blog.matto1990.com/wp-content/uploads/2010/07/dispay_problem.png "Like this image"

Thank you in advance

网友答案:

Use android:fadeScrollbars ( if you're API level 5 ) OR try to use setOnScrollListener to check scroll status and hide/show the bars .

setOnScrollListener example.

For later versions like KITKAT,

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    view.setFastScrollAlwaysVisible(true);
}

This will enable it all the time.

相关阅读:
Top