Back to project page Implementing-ActionBarSherlock-Side-Menu-Navigation-Drawer-in-Android.
The source code is released under:
Apache License
If you think the Android project Implementing-ActionBarSherlock-Side-Menu-Navigation-Drawer-in-Android 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 com.actionbarsherlock.internal.nineoldandroids.widget; //from w w w. j a v a2s . c om import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout; import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy; public class NineFrameLayout extends FrameLayout { private final AnimatorProxy mProxy; public NineFrameLayout(Context context) { super(context); mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null; } public NineFrameLayout(Context context, AttributeSet attrs) { super(context, attrs); mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null; } public NineFrameLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null; } @Override public void setVisibility(int visibility) { if (mProxy != null) { if (visibility == GONE) { clearAnimation(); } else if (visibility == VISIBLE) { setAnimation(mProxy); } } super.setVisibility(visibility); } public float getAlpha() { if (AnimatorProxy.NEEDS_PROXY) { return mProxy.getAlpha(); } else { return super.getAlpha(); } } public void setAlpha(float alpha) { if (AnimatorProxy.NEEDS_PROXY) { mProxy.setAlpha(alpha); } else { super.setAlpha(alpha); } } public float getTranslationY() { if (AnimatorProxy.NEEDS_PROXY) { return mProxy.getTranslationY(); } else { return super.getTranslationY(); } } public void setTranslationY(float translationY) { if (AnimatorProxy.NEEDS_PROXY) { mProxy.setTranslationY(translationY); } else { super.setTranslationY(translationY); } } }