I have a ListView which must fill whole free space in a parent layout. I want to remove the last divider and this is my code:

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent" >

android:id="@+id/listView"

android:layout_height="0dp"

android:layout_weight="1"

android:layout_width="fill_parent"

android:choiceMode="singleChoice"

android:listSelector="@drawable/popup_table_row"

android:footerDividersEnabled="false"

android:headerDividersEnabled="false" />

android:id="@+id/cancelbutton"

android:layout_height="wrap_content"

android:layout_width="fill_parent"

android:text="@string/cancel"

style="@style/ButtonTextBold"

android:background="@drawable/blue_button" />

The android:headerDividersEnabled="false" does nothing. The last divider is not removed. I tried to implement the layout using the RelativeLayout and setting the height of the listView to fill_parent, but it also doesn't help.

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐