carefacerz
carefacerz

Reputation: 1297

Android Development: XML layout place ontop like watermark

Lets say i got an webview with my website for example. can i add like a watermark(textView this case) on top of the webview? Is this possible to add a component on top of another without having that black space if you try to offset the text.

Need an transparent background and place the object on top of the other one

thank you!

Upvotes: 0

Views: 1334

Answers (2)

techi.services
techi.services

Reputation: 8533

Yes just nest the WebView and TextView within a RelativeLayout and set the background of the TextView to be transparent as you said.

Upvotes: 1

Cheryl Simon
Cheryl Simon

Reputation: 46844

There are two options for this. Using a FrameLayout you can have two separate layers that overlay one another.

Using a RelativeLayout you can position things such that they overlap.

In both cases, the ordering of elements in the xml file determines the Z ordering.

Upvotes: 1

Related Questions