Back to project page android-training-tutorial.
The source code is released under:
MIT License
If you think the Android project android-training-tutorial listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.flavienlaurent.vdh; //from w w w . j a v a 2s .co m import android.app.Activity; import android.os.Bundle; import android.view.Menu; /** * Created by Flavien Laurent (flavienlaurent.com) on 23/08/13. */ public class DragActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drag); 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); } } }