SeekArc detect a full cycle method

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



SeekArc detect a full cycle method



I'm creating a simple Android App and one of the features includes a seekArc. I want it to sum +1 to a number when the user has made a full cycle (he has made a complete cycle, when it begins at 0 and stops at max(90), without worrying about going back and forth).



So I developed this method which is very simple and can't handle things mentioned before, only works the user goes over the complete circle without stopping and without chunks. I was wondering if anyone got a better solution:


mSeekArc.setOnSeekArcChangeListener(new SeekArc.OnSeekArcChangeListener()

@Override
public void onStartTrackingTouch(SeekArc seekArc)


@Override
public void onStopTrackingTouch(SeekArc seekArc)


@Override
public void onProgressChanged(SeekArc seekArc, int progress, boolean fromUser)

boolean completeCycle = false;
for(int i=0;i<=90;i++)

if(progress==i && progress==90)

completeCycle=true;


if(completeCycle)

number++;
myRef.child("number").setValue(number);
textView.setText(String.valueOf(number));


);









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered