animation - button click not working after view rotation android -
i have 1 relative layout, inside added 3 image button dynamically.
when layout first appear 3 button action click event working properly, rotate whole layout per sensor changed, after rotation of layout button's postion changed can't click event of buttons again @ new postion instead got click event on button's previous positions.
please suggest me proper solution.
any appreciated.
below code how added button , apply roation it's parent view.
imagebutton mimage = new imagebutton(context); mimage.setx(x); mimage.sety(x); mimage.setid(id); mimage.settag(id); mimage.setimageresource(r.drawable.dot); this.addview(mimage);
rotation code,
rotateanimation ra = new rotateanimation(currentdegree, -degree, animation.relative_to_self, 0.5f, animation.relative_to_self, 0.5f); ra.setduration(210); ra.setfillafter(false); view.startanimation(ra);
Comments
Post a Comment