Android Radio Button Animation -
Android Radio Button Animation -
hello guys inquire question related custom radio button. designed radio button custom background , flip animation. when click radio button flip , changes background due radio button property first changes background , animate.please help me.i want animate first , alter background.
thank
by code, can this:
animation anim = animationutils.loadanimation(this, r.anim./*your animation*/); anim.setanimationlistener(new animation.animationlistener(){ @override public void onanimationstart(animation arg0) { } @override public void onanimationrepeat(animation arg0) { } @override public void onanimationend(animation arg0) { if(buttonname.ischecked()){ buttonname.setimageresource(r.drawable.imagechecked); }else{ buttonname.setimageresource(r.drawable.imageunchecked); } } }); buttonname.setoncheckedchangelistener(new oncheckedchangelistener() { public void oncheckedchanged(radiogroup group, int checkedid) { buttonname.startanimation(anim); } });
android
Comments
Post a Comment