Animation Text View
TextView tempno = (TextView) findViewById(R.id.mobile_number);
Animation anim = new AlphaAnimation(0.0f, 1.0f);
anim.setDuration(3000); // You can manage the time of the blink with
// this parameter
anim.setStartOffset(70);
anim.setRepeatMode(Animation.REVERSE);
anim.setRepeatCount(Animation.INFINITE);
tempno.startAnimation(anim);
Animation Button
// LOGOUT
Button logout = (Button) findViewById(R.id.more);
Animation mAnimation = new AlphaAnimation(1, 0);
mAnimation.setDuration(400);
mAnimation.setInterpolator(new LinearInterpolator());
mAnimation.setRepeatCount(Animation.INFINITE);
mAnimation.setRepeatMode(Animation.REVERSE);
logout.startAnimation(mAnimation);
logout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent out = new Intent(getApplicationContext(),
nanoakhi.rcfinternal.staffcorner.Login.class);
arg0.clearAnimation();
startActivity(out);
}
});
Enjoy!!!!!
TextView tempno = (TextView) findViewById(R.id.mobile_number);
Animation anim = new AlphaAnimation(0.0f, 1.0f);
anim.setDuration(3000); // You can manage the time of the blink with
// this parameter
anim.setStartOffset(70);
anim.setRepeatMode(Animation.REVERSE);
anim.setRepeatCount(Animation.INFINITE);
tempno.startAnimation(anim);
Animation Button
// LOGOUT
Button logout = (Button) findViewById(R.id.more);
Animation mAnimation = new AlphaAnimation(1, 0);
mAnimation.setDuration(400);
mAnimation.setInterpolator(new LinearInterpolator());
mAnimation.setRepeatCount(Animation.INFINITE);
mAnimation.setRepeatMode(Animation.REVERSE);
logout.startAnimation(mAnimation);
logout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent out = new Intent(getApplicationContext(),
nanoakhi.rcfinternal.staffcorner.Login.class);
arg0.clearAnimation();
startActivity(out);
}
});
Enjoy!!!!!
Post a Comment
0Comments