Switch Screen/Activity By Swiping Android Java -


I have an application with different screens / activity. Right now it works fine, but I have previous and next buttons I'll take out this button, and will use a swipe location for the next "say" I got a lot on the internet, some to find out, but it does not work with my listview when I have a Swipe on textview works fine, but when I do Put your code with listview in code, it is nothing more to know.

Can anyone help me?

In my own code I use a public view getView to see list, list, iTemClick and some images and text views in my view.

onTouchEvent does not work with my list view. Public boolean onTouchEvent {MotionEvent touvevent} {switch (touchevent.getAction ()) {// When user touches the screen for the first time, we get the X and Y coordinates case MotionEvent.ACTION_DOWN : {X1 = touchevent.getX (); Y1 = touchevent.getY (); break; } MotionEvent.ACTION_UP case: {x2 = touchevent.getX (); Y2 = TwWWent.GT (); // If the right sweep on the screen is left on the event (x1 & lt; x2) {Toast. Maketext (This, "Left to Right Swap Exhibit", Toast. LNNHT_LOG). Show (); } // If the right to sweep event on the left side of the screen (x1> x2) {toast. Make text (this, "right to left swap performance", toast. LNNHT_LOG). Show (); } // If the events below the UV are going to shake on the screen (y1 and lt; y2) {toast. Maketext (this, "UP to down swap performance", Toast. LNNHT_LOG). Show (); } // If down to UP sweep event on screen (y1> y2) {Toast. Make text (this, "down to perform the U.P. swap", Toast. LNNHT_LAG). Show (); } break; } } return false; }

Update

But whatever I know is with different sections. In the examples, they use fragment1.java , fragment2.java , fragment3.java . But I have only my main_activity.java and this is going on, and when I click on my next button, it reloads the main activity, and shows other information and then again Unless my counter is at its maximum.

I think swipe should not happen from one piece to another segment activity another avtivity ..


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -