views:

98

answers:

1

I would like to show a banner in an Android activity.

The banner should be:

  • Aligned at the bottom of the layout
  • Take all the width and have relative height (say 100dip)
  • Be dismissable

When dismissed the rest of the layout should strech to fill the area that was occupied by the banner.

What's the best way to implement this in Android?

Thanks!

A: 

you can set up an Animation to slide the banner down, and when it's out of the view (setup a onAnimationComplete listener) call it's method : setVisibility(View.GONE) so it will not take up space in layout any more.

Reflog