Is there an equivalent in libGdx (in Android) like the touchdown event – so when a user touches the screen (and holds their finger down continuously),i.e. touchhelddown method?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
GestureDetector. It implementsInputAdapterso you can use it instead of your InputAdapter or along with your InputAdapter usingInputMultiplexer.You need to provide a
GestureListenerto it. GestureDetector calls GestureListener’s methods when it detects supported gestures. These methods and gestures are:You can extend
GestureAdapterand override the method you are interested in. In your case you will overridelongPressmethod. You can also providelongPressDurationas a parameter to constructor.