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 8355803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:58:32+00:00 2026-06-09T09:58:32+00:00

Trying to set orientation in manifest file, using a string qualifier android:screenOrientation=@string/orientation Works on

  • 0

Trying to set orientation in manifest file, using a string qualifier

android:screenOrientation="@string/orientation"

Works on an 4.0 asus tablet, but fails on both a 2.1 wildfire and 4.1 Galaxy S.
The problem is infact linking to a resource, If portrait is typed in it works.

Ive tried changing the qualifiers used in the tablet to test on the phone. This means the exact same code, resources and layouts are used for all devices. So it cant be spelling mistakes or build issues. But it still fails on the phones and not the tablet. This seems to be yet another bug in android.

Gives the error below, nothing in logcat

Installation error: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
Please check logcat output for more details.
Launch canceled!

Manifest section

<activity
    android:name=".MainActivity"
        android:screenOrientation="@string/orientation"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

I know I can do it programatically. But theres another issue with the wildfire, not restarting immediately. Instead it waits for views to be setup etc. This doesnt occur in the other devices.

Googled and found a few others using the methods, but they dont seem to have discovered any problems.
http://capdroid.wordpress.com/2012/07/21/different-screen-orientation-on-different-screen-size

Thanks

  • 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-09T09:58:34+00:00Added an answer on June 9, 2026 at 9:58 am

    Trying to set orientation in manifest file, using a string qualifier

    While it is a string when you type it into your editor, AFAIK it is actually stored as an integer in the system, and therefore the conversion from a string resource is unlikely to be reliable. Frankly, I’m surprised it works on that one tablet — the device manufacturer may have added support for this to handle one of their own apps.

    While you can use string resources in the manifest, they need to be things that will be stored as strings (e.g., android:label).

    You might be able to get this to work with an integer resource, looking up the values used for those constants (probably the same as their Java equivalents).

    This seems to be yet another bug in android.

    To me, this seems to be yet another place where a developer is going beyond the bounds of documented behavior, then wondering why the undocumented behavior does not work.

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

Sidebar

Related Questions

I'm trying to set a JPEG file's image orientation in ImageMagick, but not seeing
I'm trying to set activity screen orientation using a styles: Here is the styles.xml:
Possible Duplicate: How to set android show vertical orientation? I'm trying to disable auto
I'm trying to set another position for a UIButton when I change the orientation
I am trying to set the orientation of the views underneath the GestureOverlay to
I'm trying to set the text of a TextView which sounds simple enough but
I am using the printer HP LaserJet 5000 Series PCL6. Trying to set print
I'm trying to set a value to a property using VisualStateManager. The problem is
What I am trying to do is to set the activity orientation manually at
Im trying set the single table inheritance model type in a form. So i

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.