TranslateAnimation question - resizing other views in layout

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

TranslateAnimation question - resizing other views in layout

Postby Sweevo » Wed Nov 04, 2009 6:53 pm

I'm trying to figure out how to use animations to, for example, make components slide smoothly into view rather than just pop into existence suddenly.

Here's the scenario: a vertical linear layout contains
1. a view which is View.GONE most of the time, but should become View.VISIBLE under some conditions (network problems, etc)

2. another view or two of fixed size

3. a list view.

Now, it's easy to change the visibility of the top view to visible, and start an animation which shows it slide from the top of the screen.

However, I could not find any examples showing how to make the other elements in the view get pushed down gradually as the animation progresses. in this case, element 2. should also slide down in tandem, and element 3 should shrink.

Any ideas? Or, better yet, sample code?
Posts: 35
Joined: Thu Oct 16, 2008 9:27 am


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests