Search in sources :

Example 1 with SwitchAnimationUtil

use of com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil in project UltimateAndroid by cymcsg.

the class ListActivity method onWindowFocusChanged.

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (mSwitchAnimationUtil == null) {
        mSwitchAnimationUtil = new SwitchAnimationUtil();
        mSwitchAnimationUtil.startAnimation(mList, Constant.mType);
    }
}
Also used : SwitchAnimationUtil(com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil)

Example 2 with SwitchAnimationUtil

use of com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil in project UltimateAndroid by cymcsg.

the class SwitchAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.switch_animation_activity_main);
    new SwitchAnimationUtil().startAnimation(getWindow().getDecorView(), Constant.mType);
}
Also used : SwitchAnimationUtil(com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil)

Example 3 with SwitchAnimationUtil

use of com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil in project UltimateAndroid by cymcsg.

the class GridActivity method onWindowFocusChanged.

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (mSwitchAnimationUtil == null) {
        mSwitchAnimationUtil = new SwitchAnimationUtil();
        mSwitchAnimationUtil.startAnimation(getWindow().getDecorView(), Constant.mType);
    }
}
Also used : SwitchAnimationUtil(com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil)

Example 4 with SwitchAnimationUtil

use of com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil in project UltimateAndroid by cymcsg.

the class FlowerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mConverView = LayoutInflater.from(getActivity()).inflate(R.layout.switch_animation_view_fragment, null);
    mConverView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {

        @Override
        public void onGlobalLayout() {
            new SwitchAnimationUtil().startAnimation(mConverView, Constant.mType);
        }
    });
    return mConverView;
}
Also used : SwitchAnimationUtil(com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil) OnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener)

Aggregations

SwitchAnimationUtil (com.marshalchen.common.uimodule.smoothswitch.SwitchAnimationUtil)4 OnGlobalLayoutListener (android.view.ViewTreeObserver.OnGlobalLayoutListener)1