Before anything else, to my understanding, the canvas
is actually an AdView - my guess is you're using AdMob. But, that's a View
.
A LinearLayout
is a ViewGroup
and as its Javadoc description says, it's a view that contains Views
- imagine it's a container of Views
. You're supposed to use ViewGroups
within ViewGroups
only, not have them within Views
. A View
is supposed to draw something simple: a text, an image, a drawable or any combination of these. I would suggest to start reading the User Interface article from developers.
Going back to your question: A LinearLayout
will lay the textview after the canvas. If you need to add one on top of another use either a FrameLayout
or a RelativeLayout
. Also, get used to use XML layout. This link should get you started.