I know how to achieve Swipe Gesture on Views.
But I want to get SwipeGesture in WindowManager like this app doing
As far as I know Gesture detector works on view. I have tried to detect Gesture but don't know how to achieve it. Can someOne shed some light on how to achieve.
What I think is:
There must be a Transparent View to detect Swipe in this app Or is there an other way round.
Edit
I know how to add an Overlay window. And add a view to it. And then add GestureListener to it. What my Question is , Is it possible to add a gesture Listener to WindowManager without having a view. And how it can be achieved . Any sample code or example.
Related
So I am working on a floating view. I have managed to create the complete view, it looks similar to a Facebook chathead.
What I want to do:
I want to add in that fling gesture to my view. For example: I want my view to be in either the right or left edge of the screen, so a user should be able to fling it to either edge of the screen like we can in fb messenger chat head as well.
Could someone please guide me how this can be achieved ?
You can use some of the motion tracking features from Android SDK.
Check this out: https://developer.android.com/training/gestures/movement.html
It's probably the VelocityTracker API that you need.
I do not know Why I am getting error and getting my app crash saying index out of bound. I have made three different question but none of them help. So here I am saving my basic idea.
I think there is no need to share the code, All I want to draw the gesture on the gestureOverlayView are the points given below
if the gesture is the right gesture Say Letter A then it should stay visible if not then it should disappear as it does every time.
If the user has made the right gesture then the gesture should not be disappear , but there is a reset button , when the user made the correct gesture and let say it is not disappear then when user click on the Reset Button then the gestureOverlayView Should be removed
So Please kindly guide me how can I made gesture permanent after when it is the gesture we wanted user to made and then if it is our desired gesture and successfully made it permanent then how to reset it on the reset button
Please guide me and help me
the lazy swipe app opens when user swipes from bottom left corner of the screen diagonally. how is this done? how lazy swipe app is only seen as an arc, and not on the whole screen? I want to make an app like that? please tell me how should I start to make that kind of swipe gesture?
I donw know the app, but there are serval ways to do that.
basically you have to override onInterceptTouchEvent() and onTouchEvent() for your View
or
you can override Activity.onTouchEvent() to let the activity intercept all touch events.
Have a look here:
https://developer.android.com/training/gestures/viewgroup.html
Update:
After reviewing LazySwipe: Lazy Swipe is using the same mechanism / android api as Facebook chats heads. It's not an activity. Basically its a Service. Here is a discussion and implementation. There are also libraries on Github (I have never used that one).
But as you see it's not an Activiy, hence you can not use Activity.onTouch(). However, you can display and interact any regular View or ViewGroup. Therefore, overriding ViewGoroup.onInterceptTouchEvent() and ViewGorup.onTouchEvent() is possible. So yes, you can detect Swipe gestures.
There are alredy some gesture detectors build in on Android that you can use. Have a look here: https://developer.android.com/training/gestures/scroll.html
I have submit button. When I do click or tap below a submit button, it should be able to recognize the gesture by programmatically in android. How could I do this?
Do I need to download anything based on Gestures? Else what should I do for this Gestures?
And, like a Gesture point- If I draw a line using Gesture concept or anything, gesture should perform its actions . After I draw a line, it should be able to open another screen. It must be able to display the last page.
maybe you need this android gestures.
To get information with regard to creating Gesture application at http://androidresearch.wordpress.com/2012/01/10/working-with-gesture-api-in-android/
Hi i was wondering if android has view that responds to user slides.
If you want to know exactly what i mean there is one in the galaxy tab for unlocking the phone and muting/activating sound on the bottom of the screen.
Seems like the iPhone slide to unlock feature.
Thanks in advance I appreciate the help!
GestureOverlayView might help you.
See also:
http://developer.android.com/design/patterns/gestures.html
http://www.vogella.com/tutorials/AndroidGestures/article.html
All the views can respond to "user slides". In Android, this is a gesture called fling or swipe. You can see this tutorial for a sample implementation.
Basically:
implement onFling of SimpleOnGestureListener in your own class
call your gesture listener from the onTouch method of the view