-1

I want to Increase width of Android Table Layout with finger touch movement. I tried it with TouchListener and Gesture. But did not getting the exact result. Please share some idea.

  • 1
    If you add the exact code that gave you the result that is 'not getting the exact result' it would be more helpful to the community and may facilitate a more accurate response. – Stephen B. Sep 04 '13 at 17:11

1 Answers1

1

You can get this using GestureDetector.SimpleOnGestureListener. From here you can get the gesture related information as follows :- http://developer.android.com/reference/android/view/GestureDetector.SimpleOnGestureListener.html

Here you will get the Methods as follows:-

   public boolean  onScroll (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)

Inside this Method you need to add the distanceX to width of your coloumn view.

like TextView_1.setWidth(TextView_1.getWidth()+Integer.parseInt(distanceX));

Hope you will get a clue from here.

you can check this link as reference example of gesture detector

http://www.androidsnippets.com/gesturedetector-and-gesturedetectorongesturelistener

Praveen Sharma
  • 4,326
  • 5
  • 25
  • 45