Reputation: 15462
I have the following xml's:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<TextView
android:id="@+id/errorMsg"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ListView
android:id="@+id/offers_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false" />
</LinearLayout>
and this xml for each item in the listView:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<RelativeLayout
android:id="@+id/offerImage"
android:layout_width="match_parent"
android:layout_height="360dp"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<ImageButton
android:id="@+id/lockImage"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="82dp"
android:scaleType="fitXY"
android:src="@drawable/lock_closed" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2" />
<Button
android:id="@+id/unlikeBtn"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#334455"
android:text="@string/unlike" />
</LinearLayout>
</LinearLayout>
And i cannot understand why i see an underlying line below the list?
Upvotes: 0
Views: 53
Reputation: 361
It is because you have single row in listview and it is the divider line between 2 rows . You can remove it by using android:dividerHeight="0dp" android:divider="#00000000"
Upvotes: 2
Reputation: 38429
I think this is listview divider and below code to remove this:-
do in you code
getListView().setDivider(null);
getListView().setDividerHeight(0);
or do on xml
android:divider="@null"
android:dividerHeight="0dp"
android:divider="#00000000" (as transparent color)
Upvotes: 0