-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Added new dialog for difference events like success, error, warnin…
…g, info, etc.
- Loading branch information
1 parent
b878161
commit ae81f84
Showing
32 changed files
with
1,082 additions
and
34 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package com.amit.anim; | ||
|
||
import android.content.Context; | ||
import android.view.animation.AlphaAnimation; | ||
import android.view.animation.Animation; | ||
import android.view.animation.AnimationSet; | ||
import android.view.animation.ScaleAnimation; | ||
|
||
/** | ||
* Created by Amit Jangid on 22,May,2018 | ||
**/ | ||
public class AnimLoader | ||
{ | ||
public static AnimationSet getInAnimation(Context context) | ||
{ | ||
AnimationSet in = new AnimationSet(context, null); | ||
|
||
AlphaAnimation alpha = new AlphaAnimation(0.0f, 1.0f); | ||
alpha.setDuration(90); | ||
|
||
ScaleAnimation scale1 = new ScaleAnimation( | ||
0.8f, 1.05f, 0.8f, 1.05f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f); | ||
|
||
scale1.setDuration(135); | ||
|
||
ScaleAnimation scale2 = new ScaleAnimation( | ||
1.05f, 0.95f, 1.05f, 0.95f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f); | ||
|
||
scale2.setDuration(105); | ||
scale2.setStartOffset(135); | ||
|
||
ScaleAnimation scale3 = new ScaleAnimation( | ||
0.95f, 1f, 0.95f, 1.0f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f); | ||
|
||
scale3.setDuration(60); | ||
scale3.setStartOffset(240); | ||
|
||
in.addAnimation(alpha); | ||
in.addAnimation(scale1); | ||
in.addAnimation(scale2); | ||
in.addAnimation(scale3); | ||
|
||
return in; | ||
} | ||
|
||
public static AnimationSet getOutAnimation(Context context) | ||
{ | ||
AnimationSet out = new AnimationSet(context, null); | ||
AlphaAnimation alpha = new AlphaAnimation(1.0f, 0.0f); | ||
alpha.setDuration(150); | ||
|
||
ScaleAnimation scale = new ScaleAnimation( | ||
1.0f, 0.6f, 1.0f, 0.6f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f); | ||
|
||
scale.setDuration(150); | ||
out.addAnimation(alpha); | ||
out.addAnimation(scale); | ||
return out; | ||
} | ||
} |
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
Oops, something went wrong.