I just need a way to show default picture on all imageview ( see below ) used in a listview.

This layout is used by an adapter, so no setContentView function is called on this layout. I think this is causing the problem ( the default images doesn't appear ). How can I fix it ?

The image defaultpic.png is in the drawable folder and is 100x100px.

My code:

```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    tools:context=".MainActivity"
    android:background="#222222"
    android:paddingTop="2dp"
    android:paddingBottom="2dp">

    <TextView
        android:id="@+id/profile_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Title"
        android:textColor="#fcdb8c"
        android:background="#222222"
        android:textStyle="normal"
        android:textSize="15sp"
        android:layout_alignParentTop="true"
        android:lines="1"
        android:scrollHorizontally="true"
        android:ellipsize="end"
        android:paddingRight="40dp"
        android:paddingLeft="2dp" />

    <ImageView
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:id="@+id/profile"
        android:scaleType = "fitXY"
        android:src="@drawable/defaultpic"
        android:background="#151515"
        android:padding="1dp" />

</RelativeLayout>

```

```
@Override
public View getView(View convertView, ViewGroup parent) {

    RelativeLayout profileLay = (RelativeLayout)profileInf.inflate
            (R.layout.profile_layout, parent, false);

    TextView profileView = (TextView)profileLay.findViewById(R.id.profile_name);
    ImageView coverView = (ImageView)profileLay.findViewById(R.id.profile);

    profileView.setText(currProfile.getName());
    Drawable img = Drawable.createFromPath(currProfile.getCover());
    coverView.setImageDrawable(img);
    return profileLay;
}

```