Thursday, February 16, 2012

Add layout for ImageView


I have an ImageView




<ImageView
android:id="@+id/auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10sp"
android:src="@drawable/auto" />



How can I add layout for this image in onCreate for Activity? For instance, I want add background for this image. Thanks.

1 comment:

  1. Enclose it in a Layout and add a background to the Layout.

    ReplyDelete