Search in sources :

Example 1 with ZBarScannerView

use of me.dm7.barcodescanner.zbar.ZBarScannerView in project barcodescanner by dm77.

the class FullScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    if (state != null) {
        mFlash = state.getBoolean(FLASH_STATE, false);
        mAutoFocus = state.getBoolean(AUTO_FOCUS_STATE, true);
        mSelectedIndices = state.getIntegerArrayList(SELECTED_FORMATS);
        mCameraId = state.getInt(CAMERA_ID, -1);
    } else {
        mFlash = false;
        mAutoFocus = true;
        mSelectedIndices = null;
        mCameraId = -1;
    }
    setContentView(R.layout.activity_full_scanner);
    setupToolbar();
    ViewGroup contentFrame = (ViewGroup) findViewById(R.id.content_frame);
    mScannerView = new ZBarScannerView(this);
    setupFormats();
    contentFrame.addView(mScannerView);
}
Also used : ViewGroup(android.view.ViewGroup) ZBarScannerView(me.dm7.barcodescanner.zbar.ZBarScannerView)

Example 2 with ZBarScannerView

use of me.dm7.barcodescanner.zbar.ZBarScannerView in project barcodescanner by dm77.

the class FullScannerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle state) {
    mScannerView = new ZBarScannerView(getActivity());
    if (state != null) {
        mFlash = state.getBoolean(FLASH_STATE, false);
        mAutoFocus = state.getBoolean(AUTO_FOCUS_STATE, true);
        mSelectedIndices = state.getIntegerArrayList(SELECTED_FORMATS);
        mCameraId = state.getInt(CAMERA_ID, -1);
    } else {
        mFlash = false;
        mAutoFocus = true;
        mSelectedIndices = null;
        mCameraId = -1;
    }
    setupFormats();
    return mScannerView;
}
Also used : ZBarScannerView(me.dm7.barcodescanner.zbar.ZBarScannerView)

Example 3 with ZBarScannerView

use of me.dm7.barcodescanner.zbar.ZBarScannerView 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 ZBarScannerView(this);
    contentFrame.addView(mScannerView);
}
Also used : ViewGroup(android.view.ViewGroup) ZBarScannerView(me.dm7.barcodescanner.zbar.ZBarScannerView)

Example 4 with ZBarScannerView

use of me.dm7.barcodescanner.zbar.ZBarScannerView in project aware-client by denzilferreira.

the class Aware_QRCode method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mScannerView = new ZBarScannerView(this);
    LinearLayout main = new LinearLayout(this);
    main.setOrientation(LinearLayout.VERTICAL);
    ListView list = new ListView(this);
    list.setId(android.R.id.list);
    list.setVisibility(View.GONE);
    main.addView(mScannerView);
    main.addView(list);
    setContentView(main);
}
Also used : ListView(android.widget.ListView) ZBarScannerView(me.dm7.barcodescanner.zbar.ZBarScannerView) LinearLayout(android.widget.LinearLayout)

Aggregations

ZBarScannerView (me.dm7.barcodescanner.zbar.ZBarScannerView)4 ViewGroup (android.view.ViewGroup)2 LinearLayout (android.widget.LinearLayout)1 ListView (android.widget.ListView)1