controlwear / virtual-joystick-android

This library provides a very simple and ready-to-use custom view which emulates a joystick for Android.
Apache License 2.0
352 stars 123 forks source link

fixedCenter false problem #16

Closed QitmentX7 closed 6 years ago

QitmentX7 commented 6 years ago

Hello, dear friend! I want use your awesome library! And i need your help! Because I need the button not to return to the center. I try attribute: custom:JV_fixedCenter="false" joystick.setFixedCenter(false); But it didn't work. Great thanks in advanced for help!

makowildcat commented 6 years ago

Hello @QitmentX7 ! Thank you for feedback I will have a look quickly and fix it! (Probably this week-end) I'll let you know ! Kindly, Damien

QitmentX7 commented 6 years ago

I'll be very grateful!!!

makowildcat commented 6 years ago

Hi @QitmentX7,

Sorry being late, had a couple of exams. Did you try with the option AutoReCenterButton ? Set it to false. JV_autoReCenterButton="false" or joystick.setAutoReCenterButton(false);

With this option the button won't be re-centered automatically. I think it is what you are looking for. Be aware that if you use this option you should let the FixedCenter to default value (true) otherwise the behavior is a bit weird. You can try what suit you the best ;)

Let me know if it is correct. Too bad that I did not have a better look before, I could have answered this much earlier, I'm sorry.

Kindly,

Damien

QitmentX7 commented 6 years ago

Super it work!!! It's my fail I used the old version from github, and it function was not exist. Great thanks friend! You're doing a really cool thing!

makowildcat commented 6 years ago

Great! :) I should make a better documentation too!

I’ll close this issue.