How do I put an ImageView, which is not a child, on top of a custom ViewGroup?

88 views Asked by At

I'm trying to display an image on top of a custom ViewGroup when a condition is met? I've tried this, How do I add a ViewGroup to another ViewGroup?, but it does not help, because I dont want to make it a child as the custom ViewGroup has LinearLayout. Is there a way to do this? Thanks..

1

There are 1 answers

0
Adil Soomro On BEST ANSWER

You can put ViewGroup inside a RelativeLayaout as center.

now put ImageView inside RelativeLayout, you can specify the positions by giving layout margins..