Skip to content Skip to sidebar Skip to footer

Is It Possible To Place An Imageview In A Class That Extends View?

Is it possible to place an imageView in a class that extends View in android? If possible please give me a sample code. Thanks.

Solution 1:

If you want to create a custom view that contains an ImageView (and presumably some other items), you probably just want to extend a ViewGroup, such as a RelativeLayout rather than directly extending View.

See the "Compound Controls" section of the Custom Components page on the Android Developers' site.

Post a Comment for "Is It Possible To Place An Imageview In A Class That Extends View?"