public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
public class MyActivity extends Activity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void animate(View view){ LinearLayout dialog = (LinearLayout)findViewById(R.id.dialog); dialog.setVisibility(LinearLayout.VISIBLE); Animation animation = AnimationUtils.loadAnimation(this, R.anim.anim); animation.setDuration(500); dialog.setAnimation(animation); dialog.animate(); animation.start(); } }
public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
anim.setAnimationListener(new Animation.AnimationListener() { public void onAnimationStart(Animation animation) { } public void onAnimationEnd(Animation animation) { Animation anim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.diamond2); findViewById(R.id.img).setAnimation(anim); anim.start(); } public void onAnimationRepeat(Animation animation) { } });
public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
_flyInTruckHandler.postDelayed(new Runnable() { public void run() { Animation anim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.flyin); findViewById(R.id.main_garbageTruck).setAnimation(anim); _flyInTruckHandler.sendEmptyMessage(0); anim.start(); } }, 2000);
public void run(AnimationObject object, Object animation, String value){ ((Animation)animation).start(); } }
public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
View hello= findViewById(R.id.lin_hello); final RelativeLayout rel=(RelativeLayout)findViewById(R.id.rel_nah_hide); hello.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { expand=!expand; Animation a=expand(rel, expand); rel.setAnimation(a); a.start(); } });
public void start(float fromAlpha, float toAlpha) { mFromAlpha = fromAlpha; mToAlpha = toAlpha; super.start(); }
@Override public void start() { super.start(); view.startAnimation(this); } }
public void slideInFromBottom(View v) { Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.slide_in_from_bottom); v.setAnimation(animation); v.animate(); animation.start(); }
public void slideInFromTop(View v) { Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.slide_in_from_top); v.setAnimation(animation); v.animate(); animation.start(); }
public void rollDie(View view) { // Setup the animation. Animation shake = AnimationUtils.loadAnimation(view.getContext(), R.anim.shake); View dice = findViewById(R.id.dice); dice.setAnimation(shake); shake.start(); handler.sendMessageDelayed(Message.obtain(handler, 0, 7), 200); }
private void showEnterAnimation() { if (enterAnimation == null) enterAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.socialize_shareboard_animation_in); grid.setAnimation(enterAnimation); enterAnimation.start(); }
@Override public void onSystemUiVisibilityChange(int visibility) { if (visibility == View.SYSTEM_UI_FLAG_VISIBLE) { View view = findViewById(R.id.title_panel); Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.push_down_in); view.setAnimation(animation); view.setVisibility(View.VISIBLE); animation.start(); } } });
@Implementation public void startAnimation(Animation anim) { setAnimation(anim); animation.start(); }
private void executarAnimacao() { Interpolator interpolator = mInterpolators[mSpnInterpolator.getSelectedItemPosition()]; Animation animation = mAnimacoes[mSpnAnimation.getSelectedItemPosition()]; animation.setInterpolator(interpolator); animation.setAnimationListener(this); mImg.requestLayout(); mImg.setAnimation(animation); animation.start(); mButtonPlay.setEnabled(false); } }
private void hideContextualToolbar() { mHeader.showActionbarShadow(); Toolbar tb = mContextualToolbar; tb.setNavigationOnClickListener(mNavigationListener); tb.setOnMenuItemClickListener(null); RelativeLayout rl = mRlContextualToolbar; rl.setAnimation(hideContextualToolbar); hideContextualToolbar.start(); rl.setVisibility(View.INVISIBLE); tb.getMenu().clear(); }