I have a list view which is using simple cursor adapter.

A shape drawable is created in code -

```
DrawableProvider dr = new DrawableProvider();
ShapeDrawable shDr = dr.getDrawable();

LinearLayout v = (LinearLayout)findViewById(R.id.row_packlist);
v.setBackgroundDrawable(shDr);

```

Following is the layout defining list item

```
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/row_packlist"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:orientation="vertical" >

```

Its not working for the reason

```
 LinearLayout v = (LinearLayout)findViewById(R.id.row_packlist);

```

returning null.

How can I set the drawable as background pragmatically ?