Android animation moves the Layout, but not the buttons
<p>Say I have a "main screen" Layout which has to move up, to reveal a "history bar".</p>

<pre><code>if ( HistoryBar == false )
                    {
                        HistoryBar = true;
                        TranslateAnimation MainScreenPullUp = new TranslateAnimation(0, 0, 0, -200 );
                        MainScreenPullUp.setDuration(350);
                        MainScreenPullUp.setFillAfter(true);
                        LinLayMain.startAnimation(MainScreenPullUp);
                    }
</code></pre>

<p>Right now I am doing it like that. But the problem is, that while the main screen layout itself moves up, all the button places keep the same, i.e. the button picture moves, but the click-spot remains in place. Any ideas how to fix that?</p>

<p>I tried useing an animationListener, instead setFillAfter(true) , which would TanslateY the main screen layout, once the animation stops, but it makes the layout jump and flicker. Are there any other ways?</p>

<p>edit:</p>

<p>Thanks, Vineet.</p>

<p>Got it working with:</p>

<pre><code>ObjectAnimator pullUp = ObjectAnimator.ofFloat(LinLayMain, "translationY", 0f, -200f);
                        pullUp.setDuration(350);
                        pullUp.start();
</code></pre>
