Remove shadow from top and bottom of ListView in android?

前端 未结 6 1460
盖世英雄少女心
盖世英雄少女心 2020-12-29 17:59

I have created a custom listView with the row as follows:

 

        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 18:50

    I'm assuming you're talking about the fading edges. To disable them:

    android:fadingEdge="none"
    

    or

    listView.setVerticalFadingEdgeEnabled(false);
    

    UPDATE

    As Pim Reijersen pointed out in the comments, android:fadingEdge is deprecated and will be ignored as of API level 14. Please use:

    android:fadingEdgeLength="0dp"
    

提交回复
热议问题