How to create Gestures in my application? - android

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/

Related

How can I implement a user "swipe up to reveal" on android

I want to implement a lock screen where the user has to swipe up an image to reveal the app lock screen. I know how to animate views, but how do I animate them based on user input? (i.e. not just swipe up, user should be able to pull the image along)
I really don't know the term for this action so I've been stumped trying to search for it. I tried searching google in many ways but no results
You can use GestureDetector to detect user's gesture and then you need to animation views.Use below links for ref
https://github.com/pwittchen/swipe
https://github.com/championswimmer/SimpleFingerGestures_Android_Library
https://stackoverflow.com/a/12938787/1481962

How to draw and recognize gesture using gesture overlay view

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

Drag and Drop Items from Listview into Activity

In my app, I want the user to be able to follow this list of instructions to be able to put a link to their installed android apps into a widget that I am creating.
In the widget, when the user taps the widget it opens up a new activity which contains all of their apps. To add new app links to that activity, I want the user to be able to pull out a kind of scrolling tab that would hold a list of all of their applications they have on their device (I already know how to do this). The user would then be able to press and hold on a app from that listview and then drag it into the droppable area in the widget that would hold their app. Please note the picture below to get a better idea of what I mean (sorry for poor quality):
How could I turn a listview object into something that is able to do this? I would have to make the listview have a touch listener attribute and then make the droppable area have a drag event, that much I am sure of (somewhat from just looking around on how to make things drag and droppable).
How could I do this? Any ideas or comments on improvements are appreciated!
You could use setOnItemLongClickListener to set a listener waiting for a long click then when it is fired begin the drag process.

Implement swipe gesture on whole ListView

I need to implement a swipe gesture using two finger touch input on my ListView from right to left and vice-versa, but it should work exactly like an app named Clean Master who applied this under its "History" section (check the image) for going from Cache to Residual files (but using sinlgle touch input and i want to implement this using two finger touch input). If you've used this app, can you please tell me how to implement this. I've no idea being new to this concept. Please help me learn.
Is this what you need? Its a library called swipe listview.Its so easy to use and have customization options.

Android How to make only part of the screen clickable?

I am going to code a walkthrough tutorial for my app.
I wish the user will follow the step of the tutorial. So I want to force the user to click on a specific button but not other parts of the app.
My app has many UI components and some of them are added programmatically so disabling them one by one is not practical.
One immediate solution is that I make a transparent Activity to cover the original Activity.
But I don't know how should I detect the touch event through the overlay Activity to operate the original Activity.
Or are there any better way to make a walkthrough tutorial on android apps without much affects to the original code? Tutorial is an adhoc feature and I dont want these adhoc features to ruin my coding with a lot of if-statement on every Activity.
Thank you.
Activity won't work. Only the one at the top of the stack can process infos.
Simply add a semi-opaque view above the screen using a relativelayout
Then simply monitor the ontouch event of this view. If the touch is in the accepted zone of the tutorial, then let it bubble up to underneath control. If if is outside the accepted zone consume the event.
Button btn = new Button(getActivity());
btn.setText("Next");
// Adding button to bottom
lv.addFooterView(btn);

Categories

Resources