I have a ListView
in one of my activity. I have one customview which is created extending ImageView
.I want to add this customview as background of
You cannot use your custom View
as Background of ListView
.
However a workaround could be:
RelativeLayout
as parent layout container.LinearLayout
with property of fill_parent
for both width and
heightlist_background
to the LinearLayout
.ListView
to the parent RelativeLayout
.android:layout_centerInParent="true"
to both of the
ListView
and LinearLayout
ListView
and your CustomRow
if you have
any.LinearLayout
in Java and add the View
to that
LinearLayout