c# - Lock screen orientation to portrait when scanning with Zxing library, Xamarin.android app. -
i've seen can done in camera configuration manager not sure find file???
i've added:
<activity android:name="mainactivity" android:configchanges="keyboardhidden|orientation" android:screenorientation="portrait"/>
and mainactivity locked on portrait, when running zxing scanner inside activity screen rotates during scan??
add main activity lock orientation
[activity (label = "yourlabel", mainlauncher = true, screenorientation = android.content.pm.screenorientation.landscape)]
to change orientation code use this:
if (scanning) requestedorientation = android.content.pm.screenorientation.portrait;
Comments
Post a Comment