views:

39

answers:

2

Is it possible to add TextView and ImageView on canvas?

+2  A: 

Canvas does not inherit from ViewGroup, so it does not have the ability to add child views to it.

With Canvas, you use drawBitmap and drawText methods to draw images and text instead of adding child controls like TextView and ImageView.

Rich
A: 

If you need to freely position ImageViews and TextViews, you should use a RelativeLayout.

The RelativeLayout has advanced positioning features and allows overlapping.

DavLink