Answer the question
In order to leave comments, you need to log in
How to make a preview imitating 3D touch (as in instagram)?
On Instagram, you can preview a post by holding the block with a photo, we want to implement the same in our application. How can this be implemented?
Who does not use instagram below attached a video with a time code.
https://youtu.be/AasLJJ-JDxQ?t=55s
_
_ when the dialog box is opened, the listener stops firing due to the overlap of the element.
Answer the question
In order to leave comments, you need to log in
Register an OnTouchEventListener for this view and listen for the MotionEvent.ACTION_DOWN and MotionEvent.ACTION_UP events. For the first one, wait 200-300 milliseconds, and if MotionEvent.ACTION_UP has not happened yet, open the dialog. When MotionEvent.ACTION_UP occurs, the dialog collapses.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question