There are several, depending on what kind of flashing you mean. You can, for example, use alpha animation and start it as your button first appears. And when the user clicks button, in your
OnClickListener
just do clearAnimation()
.
Example:
public void onCreate(Bundle savedInstanceState) {
final Animation animation = new AlphaAnimation(1, 0); // Change alpha from fully visible to invisible
animation.setDuration(500); // duration - half a second
animation.setInterpolator(new LinearInterpolator()); // do not alter animation rate
animation.setRepeatCount(Animation.INFINITE); // Repeat animation infinitely
animation.setRepeatMode(Animation.REVERSE); // Reverse animation at the end so the button will fade back in
final Button btn = (Button) findViewById(R.id.your_btn);
btn.startAnimation(animation);
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View view) {
view.clearAnimation();
}
});
}
Wow, Excellent post. This article is really very interesting and effective. I think its must be helpful for us. Thanks for sharing your informative.
ReplyDeletesocial exchange sites
earn money online
social bookmarking sites list
directory submission site list
article submission sites
blog commenting sites
forum posting sites
press release sites list
outsourcing
off page seo
seo tutorial
free seo tools
freelancing
freelancing sites
seo