-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dd2a9e
commit 1849347
Showing
72 changed files
with
3,381 additions
and
116 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
...iAutoLogin/app/src/main/java/com/daimajia/androidanimations/library/BaseViewAnimator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2014 daimajia | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package com.daimajia.androidanimations.library; | ||
|
||
import android.view.View; | ||
import android.view.animation.Interpolator; | ||
|
||
import com.nineoldandroids.animation.Animator.AnimatorListener; | ||
import com.nineoldandroids.animation.AnimatorSet; | ||
import com.nineoldandroids.view.ViewHelper; | ||
|
||
public abstract class BaseViewAnimator { | ||
|
||
public static final long DURATION = 1000; | ||
|
||
private AnimatorSet mAnimatorSet; | ||
private long mDuration = DURATION; | ||
|
||
{ | ||
mAnimatorSet = new AnimatorSet(); | ||
} | ||
|
||
|
||
protected abstract void prepare(View target); | ||
|
||
public BaseViewAnimator setTarget(View target) { | ||
reset(target); | ||
prepare(target); | ||
return this; | ||
} | ||
|
||
public void animate() { | ||
start(); | ||
} | ||
|
||
/** | ||
* reset the view to default status | ||
* | ||
* @param target | ||
*/ | ||
public void reset(View target) { | ||
ViewHelper.setAlpha(target, 1); | ||
ViewHelper.setScaleX(target, 1); | ||
ViewHelper.setScaleY(target, 1); | ||
ViewHelper.setTranslationX(target, 0); | ||
ViewHelper.setTranslationY(target, 0); | ||
ViewHelper.setRotation(target, 0); | ||
ViewHelper.setRotationY(target, 0); | ||
ViewHelper.setRotationX(target, 0); | ||
ViewHelper.setPivotX(target, target.getMeasuredWidth() / 2.0f); | ||
ViewHelper.setPivotY(target, target.getMeasuredHeight() / 2.0f); | ||
} | ||
|
||
/** | ||
* start to animate | ||
*/ | ||
public void start() { | ||
mAnimatorSet.setDuration(mDuration); | ||
mAnimatorSet.start(); | ||
} | ||
|
||
public BaseViewAnimator setDuration(long duration) { | ||
mDuration = duration; | ||
return this; | ||
} | ||
|
||
public BaseViewAnimator setStartDelay(long delay) { | ||
getAnimatorAgent().setStartDelay(delay); | ||
return this; | ||
} | ||
|
||
public long getStartDelay() { | ||
return mAnimatorSet.getStartDelay(); | ||
} | ||
|
||
public BaseViewAnimator addAnimatorListener(AnimatorListener l) { | ||
mAnimatorSet.addListener(l); | ||
return this; | ||
} | ||
|
||
public void cancel(){ | ||
mAnimatorSet.cancel(); | ||
} | ||
|
||
public boolean isRunning(){ | ||
return mAnimatorSet.isRunning(); | ||
} | ||
|
||
public boolean isStarted(){ | ||
return mAnimatorSet.isStarted(); | ||
} | ||
|
||
public void removeAnimatorListener(AnimatorListener l) { | ||
mAnimatorSet.removeListener(l); | ||
} | ||
|
||
public void removeAllListener() { | ||
mAnimatorSet.removeAllListeners(); | ||
} | ||
|
||
public BaseViewAnimator setInterpolator(Interpolator interpolator) { | ||
mAnimatorSet.setInterpolator(interpolator); | ||
return this; | ||
} | ||
|
||
public long getDuration() { | ||
return mDuration; | ||
} | ||
|
||
public AnimatorSet getAnimatorAgent() { | ||
return mAnimatorSet; | ||
} | ||
|
||
} |
184 changes: 184 additions & 0 deletions
184
KUASWifiAutoLogin/app/src/main/java/com/daimajia/androidanimations/library/Techniques.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
|
||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2014 daimajia | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package com.daimajia.androidanimations.library; | ||
|
||
import com.daimajia.androidanimations.library.attention.BounceAnimator; | ||
import com.daimajia.androidanimations.library.attention.FlashAnimator; | ||
import com.daimajia.androidanimations.library.attention.PulseAnimator; | ||
import com.daimajia.androidanimations.library.attention.RubberBandAnimator; | ||
import com.daimajia.androidanimations.library.attention.ShakeAnimator; | ||
import com.daimajia.androidanimations.library.attention.StandUpAnimator; | ||
import com.daimajia.androidanimations.library.attention.SwingAnimator; | ||
import com.daimajia.androidanimations.library.attention.TadaAnimator; | ||
import com.daimajia.androidanimations.library.attention.WaveAnimator; | ||
import com.daimajia.androidanimations.library.attention.WobbleAnimator; | ||
import com.daimajia.androidanimations.library.bouncing_entrances.BounceInAnimator; | ||
import com.daimajia.androidanimations.library.bouncing_entrances.BounceInDownAnimator; | ||
import com.daimajia.androidanimations.library.bouncing_entrances.BounceInLeftAnimator; | ||
import com.daimajia.androidanimations.library.bouncing_entrances.BounceInRightAnimator; | ||
import com.daimajia.androidanimations.library.bouncing_entrances.BounceInUpAnimator; | ||
import com.daimajia.androidanimations.library.fading_entrances.FadeInAnimator; | ||
import com.daimajia.androidanimations.library.fading_entrances.FadeInDownAnimator; | ||
import com.daimajia.androidanimations.library.fading_entrances.FadeInLeftAnimator; | ||
import com.daimajia.androidanimations.library.fading_entrances.FadeInRightAnimator; | ||
import com.daimajia.androidanimations.library.fading_entrances.FadeInUpAnimator; | ||
import com.daimajia.androidanimations.library.fading_exits.FadeOutAnimator; | ||
import com.daimajia.androidanimations.library.fading_exits.FadeOutDownAnimator; | ||
import com.daimajia.androidanimations.library.fading_exits.FadeOutLeftAnimator; | ||
import com.daimajia.androidanimations.library.fading_exits.FadeOutRightAnimator; | ||
import com.daimajia.androidanimations.library.fading_exits.FadeOutUpAnimator; | ||
import com.daimajia.androidanimations.library.flippers.FlipInXAnimator; | ||
import com.daimajia.androidanimations.library.flippers.FlipInYAnimator; | ||
import com.daimajia.androidanimations.library.flippers.FlipOutXAnimator; | ||
import com.daimajia.androidanimations.library.flippers.FlipOutYAnimator; | ||
import com.daimajia.androidanimations.library.rotating_entrances.RotateInAnimator; | ||
import com.daimajia.androidanimations.library.rotating_entrances.RotateInDownLeftAnimator; | ||
import com.daimajia.androidanimations.library.rotating_entrances.RotateInDownRightAnimator; | ||
import com.daimajia.androidanimations.library.rotating_entrances.RotateInUpLeftAnimator; | ||
import com.daimajia.androidanimations.library.rotating_entrances.RotateInUpRightAnimator; | ||
import com.daimajia.androidanimations.library.rotating_exits.RotateOutAnimator; | ||
import com.daimajia.androidanimations.library.rotating_exits.RotateOutDownLeftAnimator; | ||
import com.daimajia.androidanimations.library.rotating_exits.RotateOutDownRightAnimator; | ||
import com.daimajia.androidanimations.library.rotating_exits.RotateOutUpLeftAnimator; | ||
import com.daimajia.androidanimations.library.rotating_exits.RotateOutUpRightAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideInDownAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideInLeftAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideInRightAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideInUpAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideOutDownAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideOutLeftAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideOutRightAnimator; | ||
import com.daimajia.androidanimations.library.sliders.SlideOutUpAnimator; | ||
import com.daimajia.androidanimations.library.specials.HingeAnimator; | ||
import com.daimajia.androidanimations.library.specials.RollInAnimator; | ||
import com.daimajia.androidanimations.library.specials.RollOutAnimator; | ||
import com.daimajia.androidanimations.library.specials.in.DropOutAnimator; | ||
import com.daimajia.androidanimations.library.specials.in.LandingAnimator; | ||
import com.daimajia.androidanimations.library.specials.out.TakingOffAnimator; | ||
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInAnimator; | ||
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInDownAnimator; | ||
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInLeftAnimator; | ||
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInRightAnimator; | ||
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInUpAnimator; | ||
import com.daimajia.androidanimations.library.zooming_exits.ZoomOutAnimator; | ||
import com.daimajia.androidanimations.library.zooming_exits.ZoomOutDownAnimator; | ||
import com.daimajia.androidanimations.library.zooming_exits.ZoomOutLeftAnimator; | ||
import com.daimajia.androidanimations.library.zooming_exits.ZoomOutRightAnimator; | ||
import com.daimajia.androidanimations.library.zooming_exits.ZoomOutUpAnimator; | ||
|
||
public enum Techniques { | ||
|
||
DropOut(DropOutAnimator.class), | ||
Landing(LandingAnimator.class), | ||
TakingOff(TakingOffAnimator.class), | ||
|
||
Flash(FlashAnimator.class), | ||
Pulse(PulseAnimator.class), | ||
RubberBand(RubberBandAnimator.class), | ||
Shake(ShakeAnimator.class), | ||
Swing(SwingAnimator.class), | ||
Wobble(WobbleAnimator.class), | ||
Bounce(BounceAnimator.class), | ||
Tada(TadaAnimator.class), | ||
StandUp(StandUpAnimator.class), | ||
Wave(WaveAnimator.class), | ||
|
||
Hinge(HingeAnimator.class), | ||
RollIn(RollInAnimator.class), | ||
RollOut(RollOutAnimator.class), | ||
|
||
BounceIn(BounceInAnimator.class), | ||
BounceInDown(BounceInDownAnimator.class), | ||
BounceInLeft(BounceInLeftAnimator.class), | ||
BounceInRight(BounceInRightAnimator.class), | ||
BounceInUp(BounceInUpAnimator.class), | ||
|
||
FadeIn(FadeInAnimator.class), | ||
FadeInUp(FadeInUpAnimator.class), | ||
FadeInDown(FadeInDownAnimator.class), | ||
FadeInLeft(FadeInLeftAnimator.class), | ||
FadeInRight(FadeInRightAnimator.class), | ||
|
||
FadeOut(FadeOutAnimator.class), | ||
FadeOutDown(FadeOutDownAnimator.class), | ||
FadeOutLeft(FadeOutLeftAnimator.class), | ||
FadeOutRight(FadeOutRightAnimator.class), | ||
FadeOutUp(FadeOutUpAnimator.class), | ||
|
||
FlipInX(FlipInXAnimator.class), | ||
FlipOutX(FlipOutXAnimator.class), | ||
FlipInY(FlipInYAnimator.class), | ||
FlipOutY(FlipOutYAnimator.class), | ||
RotateIn(RotateInAnimator.class), | ||
RotateInDownLeft(RotateInDownLeftAnimator.class), | ||
RotateInDownRight(RotateInDownRightAnimator.class), | ||
RotateInUpLeft(RotateInUpLeftAnimator.class), | ||
RotateInUpRight(RotateInUpRightAnimator.class), | ||
|
||
RotateOut(RotateOutAnimator.class), | ||
RotateOutDownLeft(RotateOutDownLeftAnimator.class), | ||
RotateOutDownRight(RotateOutDownRightAnimator.class), | ||
RotateOutUpLeft(RotateOutUpLeftAnimator.class), | ||
RotateOutUpRight(RotateOutUpRightAnimator.class), | ||
|
||
SlideInLeft(SlideInLeftAnimator.class), | ||
SlideInRight(SlideInRightAnimator.class), | ||
SlideInUp(SlideInUpAnimator.class), | ||
SlideInDown(SlideInDownAnimator.class), | ||
|
||
SlideOutLeft(SlideOutLeftAnimator.class), | ||
SlideOutRight(SlideOutRightAnimator.class), | ||
SlideOutUp(SlideOutUpAnimator.class), | ||
SlideOutDown(SlideOutDownAnimator.class), | ||
|
||
ZoomIn(ZoomInAnimator.class), | ||
ZoomInDown(ZoomInDownAnimator.class), | ||
ZoomInLeft(ZoomInLeftAnimator.class), | ||
ZoomInRight(ZoomInRightAnimator.class), | ||
ZoomInUp(ZoomInUpAnimator.class), | ||
|
||
ZoomOut(ZoomOutAnimator.class), | ||
ZoomOutDown(ZoomOutDownAnimator.class), | ||
ZoomOutLeft(ZoomOutLeftAnimator.class), | ||
ZoomOutRight(ZoomOutRightAnimator.class), | ||
ZoomOutUp(ZoomOutUpAnimator.class); | ||
|
||
|
||
|
||
private Class animatorClazz; | ||
|
||
private Techniques(Class clazz) { | ||
animatorClazz = clazz; | ||
} | ||
|
||
public BaseViewAnimator getAnimator() { | ||
try { | ||
return (BaseViewAnimator) animatorClazz.newInstance(); | ||
} catch (Exception e) { | ||
throw new Error("Can not init animatorClazz instance"); | ||
} | ||
} | ||
} |
Oops, something went wrong.