use of android.view.animation.Animation in project ArcMenu by daCapricorn.
the class RayMenu method getItemClickListener.
private OnClickListener getItemClickListener(final OnClickListener listener) {
return new OnClickListener() {
@Override
public void onClick(final View viewClicked) {
Animation animation = bindItemAnimation(viewClicked, true, 400);
animation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
postDelayed(new Runnable() {
@Override
public void run() {
itemDidDisappear();
}
}, 0);
}
});
final int itemCount = mRayLayout.getChildCount();
for (int i = 0; i < itemCount; i++) {
View item = mRayLayout.getChildAt(i);
if (viewClicked != item) {
bindItemAnimation(item, false, 300);
}
}
mRayLayout.invalidate();
mHintView.startAnimation(createHintSwitchAnimation(true));
if (listener != null) {
listener.onClick(viewClicked);
}
}
};
}
use of android.view.animation.Animation in project ArcMenu by daCapricorn.
the class RayMenu method bindItemAnimation.
private Animation bindItemAnimation(final View child, final boolean isClicked, final long duration) {
Animation animation = createItemDisapperAnimation(duration, isClicked);
child.setAnimation(animation);
return animation;
}
use of android.view.animation.Animation in project UltimateAndroid by cymcsg.
the class MaterialProgressDrawable method isRunning.
@Override
public boolean isRunning() {
final ArrayList<Animation> animators = mAnimators;
final int N = animators.size();
for (int i = 0; i < N; i++) {
final Animation animator = animators.get(i);
if (animator.hasStarted() && !animator.hasEnded()) {
return true;
}
}
return false;
}
use of android.view.animation.Animation in project Libraries-for-Android-Developers by eoecn.
the class ActionBarSherlockCompat method hideProgressBars.
private void hideProgressBars(IcsProgressBar horizontalProgressBar, IcsProgressBar spinnyProgressBar) {
//getLocalFeatures();
final int features = mFeatures;
Animation anim = AnimationUtils.loadAnimation(mActivity, android.R.anim.fade_out);
anim.setDuration(1000);
if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
spinnyProgressBar.startAnimation(anim);
spinnyProgressBar.setVisibility(View.INVISIBLE);
}
if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
horizontalProgressBar.startAnimation(anim);
horizontalProgressBar.setVisibility(View.INVISIBLE);
}
}
use of android.view.animation.Animation in project android-app by eoecn.
the class SplashActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
View view = View.inflate(this, R.layout.start_activity, null);
setContentView(view);
Animation animation = AnimationUtils.loadAnimation(this, R.anim.alpha);
view.startAnimation(animation);
animation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation arg0) {
}
@Override
public void onAnimationRepeat(Animation arg0) {
}
@Override
public void onAnimationEnd(Animation arg0) {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
goHome();
}
}, 500);
}
});
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
}
Aggregations