I am currently doing my little project. I want to simply set 4 buttons in my APP and by pressing the button, I should keep doing the same thing till I release the button. ( For example, I need to use these 4 buttons to control my machine's direction.)
I've been trying few different methods, such as onTouch. However, In this method, I need to keep slightly move my finger so that I can keep doing the same thing. otherwise, it will stop. Also for onlongClicklistener and setpressed to true. None of them have the thing I want.
Can anyone tell me what methods I can call or the logic to implement this? Thank you so much! :)