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);
}
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;
}
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);
}
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);
}
Aggregations