Android-CircleMenu icon indicating copy to clipboard operation
Android-CircleMenu copied to clipboard

Getting Wrong id of items

Open adimobiletech opened this issue 5 years ago • 1 comments

I rotated the circle_layout with below code

RotateAnimation rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	rotate.setDuration(10000);
	rotate.setInterpolator(new LinearInterpolator());
	rotate.setRepeatCount(Animation.INFINITE);
	com.szugyi.circlemenu.view.CircleLayout  image= (com.szugyi.circlemenu.view.CircleLayout)findViewById(R.id.circle_layout);
	image.startAnimation(rotate);

Now when I click on items they show toasts of different items id ,click is getting wrong in this scenario .

adimobiletech avatar Mar 22 '19 17:03 adimobiletech

You should not rotate the CircleLayout that way. All you are doing is rotating the ViewGroup itself. To rotate the items you must animate the angle property of the view via the setAngle method.

szugyi avatar Mar 22 '19 18:03 szugyi