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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -