package fr.ihm.RotoscopMe;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.content.Intent;
import android.widget.TextView;

public class MainActivity extends Activity {

    protected TextView title;
    protected Button createProjectButton;
    protected Button openProjectButton;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        title = (TextView) findViewById(R.id.title);
        createProjectButton = (Button) findViewById(R.id.create_project);
        openProjectButton = (Button) findViewById(R.id.open_project);
    }

    public void createProject(View v)
    {
        Intent intentCreate = new Intent(this, CreateActivity.class);
        startActivity(intentCreate);
    }

    public void openProject(View v)
    {
        Intent intentDraw = new Intent(this, DrawActivity.class);
        startActivity(intentDraw);
    }
}

@@ -69,17 +69,197 @@
 oid.
-os.Bundle
+app.Fragment;%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.support.v4.view.PagerAdapter;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.view.MotionEvent
 ;%0Aim
@@ -323,37 +323,44 @@
 ort android.
-content.Inten
+widget.RelativeLayou
 t;%0Aimport an
@@ -383,16 +383,65 @@
 tView;%0A%0A
+import java.util.List;%0Aimport java.util.Vector;%0A%0A
 public c
@@ -479,11 +479,124 @@
 ity 
+ 
 %7B%0A%0A
+    public static int GLOBAL_TOUCH_POSITION_X = 0 ;%0A    public static int GLOBAL_TOUCH_CURRENT_POSITION_X = 0;%0A%0A
     
@@ -1053,22 +1053,2160 @@
 oject);%0A
+%0A       //Two-Finger Drag Gesture detection%0A        RelativeLayout TextLoggerLayout = (RelativeLayout)findViewById(R.id.drawer_layout);%0A        TextLoggerLayout.setOnTouchListener(%0A                new RelativeLayout.OnTouchListener()%7B%0A%0A                    @Override%0A                    public boolean onTouch(View v, MotionEvent m) %7B%0A                        handleTouch(m);%0A                        return true;%0A                    %7D%0A%0A                %7D);%0A    %7D%0A%0A    void handleTouch(MotionEvent m)%7B%0A        //Number of touches%0A        int pointerCount = m.getPointerCount();%0A        if(pointerCount == 2)%7B%0A            int action = m.getActionMasked();%0A            int actionIndex = m.getActionIndex();%0A            String actionString;%0A            switch (action)%0A            %7B%0A                case MotionEvent.ACTION_DOWN:%0A                    GLOBAL_TOUCH_POSITION_X = (int) m.getX(1);%0A                    actionString = %22DOWN%22+%22 current %22+GLOBAL_TOUCH_CURRENT_POSITION_X+%22 prev %22+GLOBAL_TOUCH_POSITION_X;%0A                    break;%0A                case MotionEvent.ACTION_UP:%0A                    GLOBAL_TOUCH_CURRENT_POSITION_X = 0;%0A                    actionString = %22UP%22+%22 current %22+GLOBAL_TOUCH_CURRENT_POSITION_X+%22 prev %22+GLOBAL_TOUCH_POSITION_X;%0A                    break;%0A                case MotionEvent.ACTION_MOVE:%0A                    GLOBAL_TOUCH_CURRENT_POSITION_X = (int) m.getX(1);%0A                    int diff = GLOBAL_TOUCH_POSITION_X-GLOBAL_TOUCH_CURRENT_POSITION_X;%0A                    actionString = %22Diff %22+diff+%22 current %22+GLOBAL_TOUCH_CURRENT_POSITION_X+%22 prev %22+GLOBAL_TOUCH_POSITION_X;%0A                    break;%0A                case MotionEvent.ACTION_POINTER_DOWN:%0A                    GLOBAL_TOUCH_POSITION_X = (int) m.getX(1);%0A                    actionString = %22DOWN%22+%22 current %22+GLOBAL_TOUCH_CURRENT_POSITION_X+%22 prev %22+GLOBAL_TOUCH_POSITION_X;%0A                    break;%0A                default:%0A                    actionString = %22%22;%0A            %7D%0A%0A            pointerCount = 0;%0A        %7D%0A        else %7B%0A            GLOBAL_TOUCH_POSITION_X = 0;%0A            GLOBAL_TOUCH_CURRENT_POSITION_X = 0;%0A        %7D%0A    %7D%0A
     
-%7D%0A
 %0A    pub

Add two finger move