blob: 11fdb5df40e4b38e72e25fb94ed1779afb44aaf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package org.sufficientlysecure.keychain.ui.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.animation.AnimationUtils;
import org.sufficientlysecure.keychain.R;
public class StatusIndicator extends ToolableViewAnimator {
public StatusIndicator(Context context) {
super(context);
LayoutInflater.from(context).inflate(R.layout.status_indicator, this, true);
setInAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_in));
setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_out));
}
public StatusIndicator(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater.from(context).inflate(R.layout.status_indicator, this, true);
setInAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_in));
setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_out));
}
@Override
public void setDisplayedChild(int whichChild) {
if (whichChild != getDisplayedChild()) {
super.setDisplayedChild(whichChild);
}
}
}
|