3

I want to have a small 'header', which when I click it, the rest content is shown with the use of a slide up animation.

I have tried some animations, but the only think I managed was to animate the content inside its parent.. What I want is that when I click the header thing the whole header and the content, which has visibility GONE, to animate up until they are both shown.

Below you may find some screenshots from an app that has this feature(rbb Radios). You can check it below when you click Livestream.

enter image description here

enter image description here

Can you give me any insights on how can this be done?

Thanks in advance!

Dimitris Makris
  • 5,183
  • 2
  • 34
  • 54
  • This is the way to go: http://stackoverflow.com/questions/4946295/android-expand-collapse-animation – Yar Apr 27 '12 at 16:51
  • Thanks a lot! I ll check that! – Dimitris Makris May 02 '12 at 10:23
  • How about a SlidingDrawer, which does exactly what you described? http://developer.android.com/reference/android/widget/SlidingDrawer.html. Bear in mind, that the SlidingDrawer takes up the screen's height by default. So, you would have to specify a specific height for the SlidingDrawer. – Abhijit Nov 16 '12 at 21:57

1 Answers1

0

You can either use SlidingDrawer or you can apply the slide out & slide in animation using Traslate animation to the layout also.

GrIsHu
  • 29,068
  • 10
  • 64
  • 102