Floating android views


I have seen mobileCore steckeez ad which is a floating image/animation with close button. I also wanted to create such animation for cross promoting my apps.

Does anybody has idea about how to make the view floating and add cross button to it without touching the layout XML of the original app?

Lot of these ad networks use hard coded java I think.

Maybe make a separate Layout with transparent background and some animations then include into main layout?