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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:58:34+00:00 2026-06-10T16:58:34+00:00

I just want to change Layout when the device has been rotated. but I’ve

  • 0

I just want to change Layout when the device has been rotated. but I’ve found that onConfigurationChanged() must call onCreate() again using setContentView with separated
layout named of *_land.xml

if(getActivity().getWindowManager().getDefaultDisplay().
getRotation() == Surface.ROTATION_0)
view = inflater.inflate(R.layout.fragment_layout, null);
else view = inflater.inflate(R.layout.fragment_layout_land, null);

Project is too big and there are many codes to fix If onCreate again without finish().

I’d like somebody help this.

Thank you.

-> onConfigurationChanged concept is keep layout I think

  • 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-10T16:58:35+00:00Added an answer on June 10, 2026 at 4:58 pm

    this is not no more interestes

    onConfigurationChanged() cannot be used with layout-land folder’s machanism. That’s because the callback concept is to keep Layout. So Activity which used the method should Inflate landscape Layout.

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

Sidebar

Related Questions

I want to be able to change the layout when a device is re-orientated
This bad boy just does not want to change size to fill the dock
I want to workaround the Webpage has expired issue. First, I just changed a
I've just joined a team which has been working in a main-always mode for
I want to dynamically change the layout, based on whether the user is accessing
I have a listview that I want to change the font size of. Of
There has been many questions on dynamically setting the position of a button, but
The code below plots some simple x-y data, but it has two problems that
I don't just mean how to switch to roman numerals, I want to change
I just want to resize the edittext so that it matches my texts. When

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.