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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:16:28+00:00 2026-05-23T20:16:28+00:00

I am not using a layout-land, but do have drawable-land. The problem is, it

  • 0

I am not using a layout-land, but do have drawable-land.

The problem is, it uses whichever drawable matches the orientation when the activity starts. I would like it to switch between using the drawable/drawable-land when the phone rotates. Is there a way to do this easily? Or should I just copy and paste my layout into layout-land, so that it actually recreates the activity? (I assume that would do the right thing, but ideally I would like it to just refresh the drawable using the correct one when I rotate)

  • 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-23T20:16:30+00:00Added an answer on May 23, 2026 at 8:16 pm

    you can check first device orientation ie manually by

    Display mDisplay= activity.getWindowManager().getDefaultDisplay();
    int width= mDisplay.getWidth();
    int Height= mDisplay.getHeight();
    
    if(width>height)
    {
    //Landscape
    //set your landscape drawable
    }
    else
    {
    //portrait
    //set your portrait drawable
    }
    

    so then no need to create “Drawable-land” folder also

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

Sidebar

Related Questions

I have an activity using an xml layout where a WebView is embedded. I
i have read somewhere about using layout template in asp.net wizard control but when
Is it possible to do the following layout with CSS but not using absolute/relative
I am not using github. We have git setup on our machine. I created
Can someone show me some html to layout the following not using tables? ______________________________________
i have created application using layout font sizes in pixels font and other layout
I am not using flash or php - and I have been asked to
I am using a ListView in an Activity class. I'm not using any XML
When not using areas dealing with the url for the JsonResults from the clientside
I'm not using hibernate and that's not a valid alternative at all. I developed

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.