title: Need help in android screen-orientation
body: <p>I having trouble in my demo application.<br/>
  Please check the screens i attached,<br/> <br> <img src="https://i.stack.imgur.com/7MBlx.png" alt="Portrait View"><img src="https://i.stack.imgur.com/qyvex.png" alt="Landscape View"><br/><br/> I want <strong>Activity A</strong> only in portrait view (should not change in landscape mode), So i declared <code>ScreenOrientation="protrait"</code> in manifest file and <strong>Activity B</strong> (theme is dialog) should be changed in any mode (portrait or landscape), But when i move my phone in landscape mode <strong>Activity B</strong> does not changes its orientation.</p>
  
  <p><br/> Activity A</p>
  
  <pre><code>package com.example.activityorientation;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Intent it = new Intent(getApplicationContext(),DialogAct.class);
          startActivity(it);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p><br/> Activity B</p>
  
  <pre><code>package com.example.activityorientation;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  public class DialogAct extends Activity{
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.dailogact);
      }
  }
  </code></pre>
  
  <p><br/>Manifest file,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.activityorientation"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.activityorientation.MainActivity"
              android:label="@string/app_name" 
              android:screenOrientation="portrait"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name="com.example.activityorientation.DialogAct"
              android:label="@string/app_name" 
              android:theme="@android:style/Theme.Dialog"/&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><br/>Need help,
  thanks.</p>