Search in sources :

Example 6 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project barcodescanner by dm77.

the class SimpleScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    setContentView(R.layout.activity_simple_scanner);
    setupToolbar();
    ViewGroup contentFrame = (ViewGroup) findViewById(R.id.content_frame);
    mScannerView = new ZXingScannerView(this);
    contentFrame.addView(mScannerView);
}
Also used : ViewGroup(android.view.ViewGroup) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Example 7 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project barcodescanner by dm77.

the class CustomViewFinderScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    setContentView(R.layout.activity_custom_view_finder_scanner);
    setupToolbar();
    ViewGroup contentFrame = (ViewGroup) findViewById(R.id.content_frame);
    mScannerView = new ZXingScannerView(this) {

        @Override
        protected IViewFinder createViewFinderView(Context context) {
            return new CustomViewFinderView(context);
        }
    };
    contentFrame.addView(mScannerView);
}
Also used : Context(android.content.Context) ViewGroup(android.view.ViewGroup) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView) IViewFinder(me.dm7.barcodescanner.core.IViewFinder)

Example 8 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project TumCampusApp by TCA-Team.

the class JoinRoomScanActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    // Programmatically initialize the scanner view
    mScannerView = new ZXingScannerView(this);
    List<BarcodeFormat> formats = ImmutableList.of(BarcodeFormat.QR_CODE);
    mScannerView.setFormats(formats);
    // Set the scanner inside the framelayout view as the content view
    setContentView(mScannerView);
}
Also used : BarcodeFormat(com.google.zxing.BarcodeFormat) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Aggregations

ZXingScannerView (me.dm7.barcodescanner.zxing.ZXingScannerView)8 ViewGroup (android.view.ViewGroup)4 Context (android.content.Context)1 Intent (android.content.Intent)1 Transaction (com.example.asus.onlinecanteen.model.Transaction)1 BarcodeFormat (com.google.zxing.BarcodeFormat)1 IViewFinder (me.dm7.barcodescanner.core.IViewFinder)1