1 package com
.actionbarsherlock
.internal
.nineoldandroids
.widget
;
3 import android
.content
.Context
;
4 import android
.util
.AttributeSet
;
5 import android
.widget
.LinearLayout
;
7 import com
.actionbarsherlock
.internal
.nineoldandroids
.view
.animation
.AnimatorProxy
;
9 public class NineLinearLayout
extends LinearLayout
{
10 private final AnimatorProxy mProxy
;
12 public NineLinearLayout(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 getTranslationX() {
44 if (AnimatorProxy
.NEEDS_PROXY
) {
45 return mProxy
.getTranslationX();
47 return super.getTranslationX();
50 public void setTranslationX(float translationX
) {
51 if (AnimatorProxy
.NEEDS_PROXY
) {
52 mProxy
.setTranslationX(translationX
);
54 super.setTranslationX(translationX
);