Back to project page StikkyHeader.
The source code is released under:
Apache License
If you think the Android project StikkyHeader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package it.carlom.stickyheader.example.animator; /* ww w .j a v a 2 s. c o m*/ import android.app.Activity; import android.view.View; import it.carlom.stikkyheader.core.animator.AnimatorBuilder; import it.carlom.stikkyheader.core.animator.HeaderStikkyAnimator; public class IconActionBarAnimator extends HeaderStikkyAnimator { private final int resIdLayoutToAnimate; private final View homeActionBar; public IconActionBarAnimator(final Activity activity, int resIdLayoutToAnimate) { this.resIdLayoutToAnimate = resIdLayoutToAnimate; homeActionBar = activity.findViewById(android.R.id.home); } @Override public AnimatorBuilder getAnimatorBuilder() { View mViewToAnimate = getHeader().findViewById(resIdLayoutToAnimate); AnimatorBuilder animatorBuilder = AnimatorBuilder.create() .applyScale(mViewToAnimate, AnimatorBuilder.buildViewRect(homeActionBar)) .applyTranslation(mViewToAnimate, AnimatorBuilder.buildViewRect(homeActionBar)); return animatorBuilder; } }