android - 删除 GridView 上的 FadingEdge。安卓 hive

标签 android android-layout gridview android-3.0-honeycomb

我需要从 GridView 中删除褪色边缘。我做了一些研究,目前下面是我的 GridView 的样子,问题是没有任何效果。有什么方法可以禁用/删除/隐藏褪色边缘吗?

    <GridView
        android:id="@+id/shop_grid_cart_items"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="#C4C4C4"
        android:fadingEdge="none"
        android:fadingEdgeLength="0px"
        android:numColumns="1"
        android:overScrollMode="never"
        android:padding="20dp"
        android:scrollbarStyle="outsideInset"
        android:verticalSpacing="3dip"
        android:requiresFadingEdge="none"  
        android:cacheColorHint="@android:color/transparent"          
        tools:listitem="@layout/shop_cart_grid_item" />

OnCreateView:cartItems.setVerticalFadingEdgeEnabled(false);

最佳答案

你可以试试这个:

android:overScrollMode="从不"

还有这里的答案: Is there a way to disable/edit the fading that a list view has at its edges?

关于android - 删除 GridView 上的 FadingEdge。安卓 hive ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16103226/

相关文章:

asp.net - 使用 DataTable 数据源搜索 Gridview

java - 构建倒计时器的 GridView 时出现问题

android - 项目不会使用 Kotlin 1.1.3 构建

android - 当 fragment 包含相机预览时 ViewPager 滑动滞后

android - 自定义 View 很慢

android - 布局中的嵌套权重

qt - 如何获取ListModel中特定项目的索引?

android - 如何在 Android 联系人列表中使用 Collcations 匹配姓名和电话

java - 如何缩小按钮的点击区域?

android - 如何设置android :gravity to TextView from Java side in Android