Link to home
Start Free TrialLog in
Avatar of Modifier1000
Modifier1000Flag for United States of America

asked on

Border around ListView in Android app

Hello Android Experts,

I have a ListView and for some reason I cannot get rid of a thick white border around it.  I've attached a screenshot too.  I would appreciate any guidance as to how I can get rid of the border.  Below is the XML of my ListItem.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#000000"
    android:clickable="true"
    android:orientation="horizontal"
    android:paddingLeft="10dp"
    android:paddingTop="10dp" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dp"
        android:contentDescription="@string/hello_world"
        android:src="@drawable/logo1" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="14dp"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="10dp"
        android:text="@string/hello_world"
        android:textColor="@color/NormalText"
        android:textSize="18sp" />

</LinearLayout>

Open in new window

ListView-border.png
ASKER CERTIFIED SOLUTION
Avatar of PCableGuy
PCableGuy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Modifier1000

ASKER

I changed per your code, but got same result with the exception that the divider lines are no longer visible due to the background color being black now.

But I did change the background of the layout itself.  And got what I needed.  I guess your suggestion of "playing with the background color" got me to think about what was different from my other layouts.  It was the background image was missing.  My dumb mistake.

Thanks for the 2nd pair of eyes!
Good, sometimes a little nudge helps.....thanks for the points.