1 package com
.actionbarsherlock
.internal
.nineoldandroids
.widget
;
3 import android
.content
.Context
;
4 import android
.util
.AttributeSet
;
5 import android
.widget
.FrameLayout
;
7 import com
.actionbarsherlock
.internal
.nineoldandroids
.view
.animation
.AnimatorProxy
;
9 public class NineFrameLayout
extends FrameLayout
{
10 private final AnimatorProxy mProxy
;
12 public NineFrameLayout(Context context
, AttributeSet attrs
) {
13 super(context
, attrs
);
14 mProxy
= AnimatorProxy
.NEEDS_PROXY ? AnimatorProxy
.wrap(this) : null
;
18 public void setVisibility(int visibility
) {
20 if (visibility
== GONE
) {
22 } else if (visibility
== VISIBLE
) {
26 super.setVisibility(visibility
);
29 public float getAlpha() {
30 if (AnimatorProxy
.NEEDS_PROXY
) {
31 return mProxy
.getAlpha();
33 return super.getAlpha();
36 public void setAlpha(float alpha
) {
37 if (AnimatorProxy
.NEEDS_PROXY
) {
38 mProxy
.setAlpha(alpha
);
40 super.setAlpha(alpha
);
43 public float getTranslationY() {
44 if (AnimatorProxy
.NEEDS_PROXY
) {
45 return mProxy
.getTranslationY();
47 return super.getTranslationY();
50 public void setTranslationY(float translationY
) {
51 if (AnimatorProxy
.NEEDS_PROXY
) {
52 mProxy
.setTranslationY(translationY
);
54 super.setTranslationY(translationY
);