use of org.storymaker.app.ui.ActivitySwipeDetector in project storymaker by StoryMaker.
the class OverlayCameraActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
overlayGroup = getIntent().getIntExtra("group", 0);
overlayIdx = getIntent().getIntExtra("overlay", 0);
mStoryMode = getIntent().getIntExtra("mode", -1);
mOverlayView = new ImageView(this);
ActivitySwipeDetector swipe = new ActivitySwipeDetector(this);
mOverlayView.setOnTouchListener(swipe);
mOverlayView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
closeOverlay();
}
});
mSurfaceView = new SurfaceView(this);
addContentView(mSurfaceView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceHolder.addCallback(this);
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
addContentView(mOverlayView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
}
Aggregations