我在此處使用自定義列表視圖,並已禁用列表視圖的分隔線。Java Android - 已禁用分隔線,但仍顯示爲
我也嘗試了正常的listview(不是自定義的),但它仍然沒有奏效。除了從xml中修改它之外,還有什麼辦法嗎?
這裏是爲ListView XML代碼
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:showDividers="none"
tools:context=".MainActivity" >
<ListView
android:id="@+id/lvListItem"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:divider="@null"
android:dividerHeight="0px" >
</ListView>
有人能幫助我擺脫分頻器的? :) 謝謝!
有一點建議:在listView中設置layout_weight會對性能產生重大影響。嘗試擺脫它或切換到RelativeLayout – Spotlight
好的,我會牢記這一點。謝謝! :) – user3640187