Search in sources :

Example 1 with CaptureView

use of com.mwaysolutions.barcode.views.CaptureView in project titanium-barcode by mwaylabs.

the class TitaniumBarcodeActivity method onCreate.

/**
	 * Lifecycle method which is called of the android runtime
	 */
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    Window window = getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    captureView = new CaptureView(this);
    captureView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    setContentView(captureView);
    CameraManager.init(getApplication());
    viewfinderView = captureView.getViewfinderView();
    lastResult = null;
    hasSurface = false;
}
Also used : Window(android.view.Window) LayoutParams(android.view.ViewGroup.LayoutParams) CaptureView(com.mwaysolutions.barcode.views.CaptureView)

Aggregations

LayoutParams (android.view.ViewGroup.LayoutParams)1 Window (android.view.Window)1 CaptureView (com.mwaysolutions.barcode.views.CaptureView)1