Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8570499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:34:20+00:00 2026-06-11T18:34:20+00:00

I have made an app which is working fine in emulator as well as

  • 0

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:

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();
    }
  }
}

Please help me.Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:34:22+00:00Added an answer on June 11, 2026 at 6:34 pm

    If you don’t care about the orientation, you might as well leave out this bit of code entirely:

    if (getResources().getConfiguration().orientation == 
          Configuration.ORIENTATION_LANDSCAPE) {
          setRequestedOrientation(0);
      }
      else
      {
          setRequestedOrientation(1);  
      }
    

    The code above also has the ugly side-effect that certain orientation changes will always result in portrait — for example, reverse-landscape would not be caught by your code. Additionally, instead of using 0 or 1, please use the constants provided, so that if the values change, your code won’t break.

    In the meantime, check your manifest — I bet you added an orientation attribute there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an android app which working fine. I implemented the Login functionality
I have made an android app which working fine. I implemented the Login functionality
I made an app which is just working fine. It displays the number of
I have made an app which uses DropBox SDK for iPhone to connect to
I have made an iPhone App which has a loginwithFacebook button , the login
I have made a layout for my app which uses a lot of activities.
I have Ripple which im using to test app made for android. App is
I have made my own sms app with a reciver. Now the emulator doesn'T
I have made an update on Google App Engine with a small fix and
I have made a program with a scroll pane, but it is not working.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.