package com.com.mr_wrong.ViewDraghelper;
import android.app.Activity;
import android.os.Bundle;
import com.example.mr_wrong.androidstudioproject.R;
/**
* Created by Mr_Wrong on 2015/5/22.
*/
public class DragActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.drag_layout);
DragLayout dragLayout = (DragLayout) findViewById(R.id.dragLayout);
if(getIntent().getBooleanExtra("horizontal", false)) {
dragLayout.setDragHorizontal(true);
}
if(getIntent().getBooleanExtra("vertical", false)) {
dragLayout.setDragVertical(true);
}
if(getIntent().getBooleanExtra("edge", false)) {
dragLayout.setDragEdge(true);
}
if(getIntent().getBooleanExtra("capture", false)) {
dragLayout.setDragCapture(true);
}
}
}