android - About Changing The Background -
the animation put application has circle. want background change when click on circle. when background changing, freezes second. how can fix this
public class main extends activity implements animationlistener { imageview imageview, imageview2; button rotatescale, countdown; // animasyon animation animasyonumuz, animasyonumuz2; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.main); imageview = (imageview) findviewbyid(r.id.imageview1); imageview2 = (imageview) findviewbyid(r.id.imageview2); rotatescale = (button) findviewbyid(r.id.mainb); countdown = (button) findviewbyid(r.id.countdown); countdowntimer countdownexample = new countdownexample(30000, 1000); countdownexample.start(); // animasyonu yükleme animasyonumuz = animationutils.loadanimation(getapplicationcontext(), r.anim.animasyonkadran1); // animasyon listener ı kurma animasyonumuz.setanimationlistener(this); animasyonumuz2 = animationutils.loadanimation(getapplicationcontext(), r.anim.animasyonimlec1); animasyonumuz2.setanimationlistener(this); // butona dokulduğunda yapılacaklar imageview.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // animasyonu başlatma imageview.startanimation(animasyonumuz); imageview2.startanimation(animasyonumuz2); imageview.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub imageview.setimageresource(r.drawable.dairebiryesil); imageview.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub imageview.setimageresource(r.drawable.daireikiyesil); imageview.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub imageview.setimageresource(r.drawable.daireucyesil); imageview.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub imageview.setimageresource(r.drawable.dairedortyesil); } }); } }); } }); } }); } }); }
Comments
Post a Comment