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

  • Home
  • SEARCH
  • 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 7680537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:08:12+00:00 2026-05-31T18:08:12+00:00

I’ve specify two separate layout xml files for an activity, one for Portrait in

  • 0

I’ve specify two separate layout xml files for an activity, one for Portrait in res/layout folder and one for Landscape in res/layout-land folder. my actual problem is that when i launch application in portrait mode it takes ui from layout and instantly i rotate my phone it doesn’t take xml from layout-land folder it takes ui from layout folder and if i launch my app in landscape mode it takes xml from layout-land folder and instantly rotate my to portrait mode it take xml from layout-land ui doesn’t change to portrait ui.

can any buddy tell me whats the problem is there any setting required for that plz help me to solve this issue .

Thanks in advance .

    this is my landscape ui xml

        <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/widget57"
        android:layout_width="400dp"
        android:layout_height="400dp"
        android:layout_gravity="center|center_vertical"
        android:layout_marginTop="30dp"
        android:orientation="vertical" >

        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="40dp" >

            <TextView
                android:id="@+id/txtName"
                android:layout_width="90dp"
                android:text="@string/UserName" />

            <EditText
                android:id="@+id/edName"
                android:imeOptions="actionNext|actionDone"
                android:paddingRight="10dp"
                android:singleLine="true"
                android:width="240dp" />
        </TableRow>

        <TableRow
            android:id="@+id/tableRow2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/txtPass"
                android:layout_width="90dp"
                android:text="@string/PassWord" />

            <EditText
                android:id="@+id/edPass"
                android:imeOptions="actionGo"
                android:paddingRight="10dp"
                android:password="true"
                android:singleLine="true"
                android:width="240dp" />
        </TableRow>

         <LinearLayout
            android:id="@+id/widget57"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            android:orientation="vertical" >

            <Button
                android:id="@+id/btnLogin"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="10dp"
                android:text="@string/btn_GO"
                android:textSize="19sp" >
            </Button>

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="30dp"
                android:text="CoinOp Solutions"
                android:textSize="30sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="10dp"
                android:text="Version 0.1" />
        </LinearLayout>


    </TableLayout>

    this is my Portrait ui

        <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/widget57"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/txt_Required"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:text=""
            android:textColor="#ffff0000" >
        </TextView>

        <TextView
            android:id="@+id/txtName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:text="@string/UserName" >
        </TextView>

        <EditText
            android:id="@+id/edName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:imeOptions="actionNext|actionDone"
            android:singleLine="true"
            android:textSize="18sp" >
        </EditText>

        <TextView
            android:id="@+id/txtPass"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="@string/PassWord" >
        </TextView>

        <EditText
            android:id="@+id/edPass"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:imeOptions="actionGo"
            android:maxLines="1"
            android:password="true"
            android:singleLine="true"
            android:textSize="18sp" >
        </EditText>

        <LinearLayout
            android:id="@+id/widget57"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            android:orientation="vertical" >

            <Button
                android:id="@+id/btnLogin"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="10dp"
                android:text="@string/btn_GO"
                android:textSize="19sp" >
            </Button>

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="30dp"
                android:text="CoinOp Solutions"
                android:textSize="30sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="10dp"
                android:text="Version 0.1" />
        </LinearLayout>

    </LinearLayout>

My manifest file

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package=""
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:debuggable="true"
        android:icon="@drawable/coinop"
        android:label="@string/app_name"
        android:theme="@style/CustomTheme" >
        <activity
            android:name=".LoginActivity"
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:windowSoftInputMode="stateVisible|adjustPan" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ShowDbList"
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:windowSoftInputMode="adjustPan" >
        </activity>
        <activity
            android:name=".Menu"
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:windowSoftInputMode="adjustPan" >
        </activity>
  • 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-05-31T18:08:14+00:00Added an answer on May 31, 2026 at 6:08 pm

    You have android:configChanges="orientation" in your manifest. According to the doc configChanges contains list of actions that you’ll handle manually yourself.

    If you remove the android:configChanges="orientation" the layout will be changed when you rotate the phone. Otherwise you’re supposed to handle it yourself.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I'm parsing an XML file, the creators of it stuck in a bunch social
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.