Android : Application does not seek into layout-land when the device changes his orientation -


I want to use layout-land subfolders to change my scenes to landscape mode. Therefore, I have created a subfolder "layout-land", copy my ideas in it and customize the layout. So I have it:

Enter image details here

Reveal me:

  & lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.test.mpaa.cameratest.app" & gt; & Lt; Use-enabled Android: name = "android.hardware.camera" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_FINE_LOCATION" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: name = "com.mycompany.myapp.basic" Android: configChanges = "orientation-keyboardHidden; screen size" Android: label = "@ string / title_activity_baseass" Android: theme = "@ style / fullscreenTheme" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.mycompany.myapp.loginActivity" Android: configChanges = "orientation-keyboardHidden; screenSize" Android: label = "@ string / title_activity_login" Android: Theme = "@Style / FullscreenTheme" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt;   

But when I start my app and rotate my device, it is always a portrait view that is displayed (in the root of the layout folder See). It seems that the Android layout does not look for ideas in the ground; the screen also revolves, but the scene is still the same.

Therefore, I tried to create a "layout-port" folder and remove all my ideas from the root layout folder, but crashed on the app because the compiler R.layout.activity_basic and R.layout activity_login is undefined.

Do I miss something ??

Thank you for your help.

OK, I got the solution if I want to manage different ideas then I

  android: configChanges = "orientation | keyboardHidden | screenize"   

   android: configChanges = "| keyboardHidden | screenSize "  

I delete" orientation "from configChanges and use the right layout folder structure and it works fine!

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -