Closed AugustoAleGon closed 7 years ago
The easiest way is to use the BarcodeCaptureFragment
inside your own xml layout
<?xml version="1.0" encoding="utf-8"?>
<RealtiveLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment android:name="devliving.online.mvbarcodereader.BarcodeCaptureFragment"
android:id="@+id/scanner"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
Ohh yes. You are totally right. I am gonna do it right know. I will test it and let you know how it goes.
Hello Mehedi. I have a doubt with the Fragment. In order to use the scanner I have to do this piece of code right?: MVBarcodeScanner.ScanningMode mode = null; @MVBarcodeScanner.BarCodeFormat int[] formats = null;
BarcodeCaptureFragment fragment = BarcodeCaptureFragment.instantiate(mode, formats); getSupportFragmentManager().beginTransaction() .add(R.id.container, fragment) .commit();
the id.container is the id of the fragment?
the R.id.container
is the layout id of the parent layout
Hello.
I am using this amazing bar scanner and I thing is really great. I am happy with the results. Nevertheless I will like to custom the size of the scanner so then the user can see what exactly is focus on.
How can I achieve that purpose with the library?
In advance thank you so much for your help.