I\'m trying to rotate Zxing display after reading a few questions and posts about the issue. After following the instructions, the display did rotate, but the rectangle of t
As of zxing library:2.2.0 support for orientation change is inherent
Add/edit the following in manifest:
<activity
android:name="com.journeyapps.barcodescanner.CaptureActivity"
android:screenOrientation="fullSensor"
tools:replace="screenOrientation" />
Set additional property at call to scanner :
IntentIntegrator integrator = new IntentIntegrator(this);
//allows portrait/landscape mode
integrator.setOrientationLocked(false);//"additional property"
integrator.initiateScan();
Reference link : https://github.com/journeyapps/zxing-android-embedded#changing-the-orientation
try this : add android:screenOrientation="sensorPortrait"
<activity android:name=".CaptureActivity"
android:screenOrientation="sensorPortrait"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:theme="@style/CaptureTheme"
android:windowSoftInputMode="stateAlwaysHidden"
In your library go to manifest file change the below line under activity tag
android:screenOrientation="portrait"