private void setDecodeProductMode() {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
- Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>();
+ Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>(4);
vector.addElement(BarcodeFormat.UPC_A);
vector.addElement(BarcodeFormat.UPC_E);
vector.addElement(BarcodeFormat.EAN_13);
*/
private void setDecode1DMode() {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
- Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>();
+ Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>(7);
vector.addElement(BarcodeFormat.UPC_A);
vector.addElement(BarcodeFormat.UPC_E);
vector.addElement(BarcodeFormat.EAN_13);
private void setDecodeQRMode() {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
- Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>();
+ Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>(1);
vector.addElement(BarcodeFormat.QR_CODE);
hints.put(DecodeHintType.POSSIBLE_FORMATS, vector);
mMultiFormatReader.setHints(hints);
*/
private void setDecodeAllMode() {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
- Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>();
+ Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>(8);
vector.addElement(BarcodeFormat.UPC_A);
vector.addElement(BarcodeFormat.UPC_E);
vector.addElement(BarcodeFormat.EAN_13);