Skip to content

Commit

Permalink
Refactoring and working on some documentation.
Browse files Browse the repository at this point in the history
GottaGetSwifty committed Aug 19, 2015

Verified

This commit was signed with the committer’s verified signature.
germa89 German
1 parent f5c09bc commit 233166b
Showing 12 changed files with 354 additions and 368 deletions.
62 changes: 62 additions & 0 deletions app/app/src/main/java/activity/AnimationParadigm.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package activity;

import org.unfoldingword.mobile.R;

import java.io.Serializable;

/**
@@ -14,4 +16,64 @@ public enum AnimationParadigm implements Serializable {
this.num = num;
}

public static int getNextAnimationEnter(AnimationParadigm paradigm){

switch (paradigm){
case ANIMATION_FORWARD_RIGHT_BACK_DOWN:
case ANIMATION_LEFT_RIGHT:{
return R.anim.enter_from_right;
}
case ANIMATION_FORWARD_UP_BACK_LEFT:
case ANIMATION_VERTICAL:
default: {
return R.anim.enter_from_bottom;
}
}
}

public static int getNextAnimationExit(AnimationParadigm paradigm){

switch (paradigm){
case ANIMATION_FORWARD_RIGHT_BACK_DOWN:
case ANIMATION_LEFT_RIGHT:{
return R.anim.exit_on_left;
}
case ANIMATION_FORWARD_UP_BACK_LEFT:
case ANIMATION_VERTICAL:
default:{
return R.anim.enter_center;
}
}
}

public static int getEndingAnimationEnter(AnimationParadigm paradigm){

switch (paradigm){
case ANIMATION_FORWARD_UP_BACK_LEFT:
case ANIMATION_LEFT_RIGHT:{
return R.anim.left_in;
}
case ANIMATION_FORWARD_RIGHT_BACK_DOWN:
case ANIMATION_VERTICAL:
default:{
return R.anim.enter_center;
}
}
}

public static int getEndingAnimationExit(AnimationParadigm paradigm){

switch (paradigm){
case ANIMATION_FORWARD_UP_BACK_LEFT:
case ANIMATION_LEFT_RIGHT:{
return R.anim.right_out;
}
case ANIMATION_FORWARD_RIGHT_BACK_DOWN:
case ANIMATION_VERTICAL:
default:{
return R.anim.exit_on_bottom;
}
}
}

}
Loading

0 comments on commit 233166b

Please sign in to comment.