App always showing landscape mode in tablet
<p>I have made an app which is working fine in emulator as well as small and medium size phones.But while running in tablet,it always shows landscape mode only.I have also used separate layout and layout-land layouts.I am not getting the reason behind it.This is the code:</p>

<pre><code>public class SplashActivity extends FragmentActivity
{
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    getWindow().setFlags(1024, 1024);

  FragmentManager fragmentmanager = getSupportFragmentManager();
  FragmentTransaction fragmenttransaction = fragmentmanager.beginTransaction();
  if (getResources().getConfiguration().orientation == 
      Configuration.ORIENTATION_LANDSCAPE) {
      setRequestedOrientation(0);
  }
  else
  {
      setRequestedOrientation(1);  
  }
  fragmenttransaction.commit();

    setContentView(R.layout.welcome);
    new Handler().postDelayed(new SplashThread(), 2000L);
  }

  class SplashThread implements Runnable
  {
    SplashThread()
    {
    }

    public void run()
    {
      SplashActivity.this.startActivity(new Intent(SplashActivity.this, McqHomePage.class));
      SplashActivity.this.finish();
    }
  }
}
</code></pre>

<p>Please help me.Thanks in advance.</p>
