Модель для эффекта Fade
This commit is contained in:
parent
7d6ed373f4
commit
404ab3e554
48
src/com/annimon/everlastingsummer/transitions/Fade.java
Normal file
48
src/com/annimon/everlastingsummer/transitions/Fade.java
Normal file
@ -0,0 +1,48 @@
|
||||
package com.annimon.everlastingsummer.transitions;
|
||||
|
||||
import android.graphics.Color;
|
||||
|
||||
/**
|
||||
* Плавный эффект перехода: img1 -> color -> img2
|
||||
* @author aNNiMON
|
||||
*/
|
||||
public class Fade implements Transition {
|
||||
|
||||
private final int outTime;
|
||||
private final int holdTime;
|
||||
private final int inTime;
|
||||
private final int color;
|
||||
|
||||
public Fade(int outTime, int holdTime, int inTime) {
|
||||
this(outTime, holdTime, inTime, Color.BLACK);
|
||||
}
|
||||
|
||||
public Fade(int outTime, int holdTime, int inTime, int color) {
|
||||
this.outTime = outTime;
|
||||
this.holdTime = holdTime;
|
||||
this.inTime = inTime;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int type() {
|
||||
return TYPE_FADE;
|
||||
}
|
||||
|
||||
public int getOutTime() {
|
||||
return outTime;
|
||||
}
|
||||
|
||||
public int getHoldTime() {
|
||||
return holdTime;
|
||||
}
|
||||
|
||||
public int getInTime() {
|
||||
return inTime;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user