开发者

Is it possible to place an imageView in a class that extends View?

开发者 https://www.devze.com 2023-01-18 10:37 出处:网络
Is it possible to p开发者_如何学Pythonlace an imageView in a class that extends View in android?

Is it possible to p开发者_如何学Pythonlace an imageView in a class that extends View in android? If possible please give me a sample code. Thanks.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消