¡@

Home 

2014/10/16 ¤W¤È 08:14:28

android Programming Glossary: greenheight

How to animate a slide in notification view that pushes the content view down

http://stackoverflow.com/questions/19098083/how-to-animate-a-slide-in-notification-view-that-pushes-the-content-view-down

Activity. public class TestActivity extends Activity private View greenView private ListView listView private int greenHeight private boolean isShowingBox @Override protected void onCreate Bundle savedInstanceState super.onCreate savedInstanceState.. .removeGlobalOnLayoutListener this else layout.getViewTreeObserver .removeOnGlobalLayoutListener this greenHeight greenView.getHeight public void clickHandler View v if isShowingBox isShowingBox false slideOut 1500 0 else isShowingBox.. new AnimatorSet set.playTogether animate from off screen in to screen ObjectAnimator.ofFloat greenView translationY greenHeight 0 ObjectAnimator.ofFloat listView translationY 0 greenHeight ObjectAnimator.ofFloat greenView alpha 0 0.25f 1 add other..