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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -