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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:03:11+00:00 2026-05-24T14:03:11+00:00

Question 1: I have some XML-based layouts which work fine on phones. But when

  • 0

Question 1:

I have some XML-based layouts which work fine on phones. But when it comes to tablets, the layouts become very wide. There is nothing wrong with this, it just looks very … unusual. So I’m thinking the easiest way to work around this is to limit the layout’s width from XML (like using an attribute “android:maxWidth=”480dp”) and be centered in the screen. But I can’t find a way to do this, could somebody help?

(I thought about providing a “layout-xlarge” folder, but given the number of layouts I have, this is troublesome and adds to maintainence burden.)

Question 2:

On the 3.0 emulator, I saw that the original Settings app is, because of the extra-large screen, changed so that the screen is split into two parts. The left-hand parts shows the available settings, and the right-hand part shows the options of the selected setting. That is, the original two-level activities are now combined into one. My quesion is: Is there an easy way, without too much programming, to achieve this? What I expect is when the program detects that it’s running on an xlarge screen, it calls some method and, voila, two activities become one. Is this possible? If not, how to achieve the lsef-right split screen?

Thank you.

  • 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-24T14:03:12+00:00Added an answer on May 24, 2026 at 2:03 pm

    The answer to both your questions is: Fragments.
    Fragments are Android’s way of tackling large screen sizes – the basic idea is that what you can have layouts that adapt to small and large screens appropriately. On phones, you’re probably used to having an activity correspond to a single screen’s worth of content. On a tablet, this is a waste of space, and you often want to display several activities worth of content on a single screen.

    Fragments are similar activities, but with a slightly different lifecycle. You still design your app around activities, but each activity can contain several fragments. Which of these fragments are shown on screen is up to you, and typically you show several at once on large screen devices.

    Using the Android compatibility package (downloaded through the Android SDk manager) allows your app to run on older Android versions, including 2.1.

    For an example, check out the API Demos: http://developer.android.com/resources/samples/Support4Demos/index.html

    For general introduction to Fragments, read the API at: http://developer.android.com/guide/topics/fundamentals/fragments.html

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

Sidebar

Related Questions

So, i have some question about xml Documents in Java. Can i get all
Right, bit of a strange question; I have been doing some linq to XML
I have some question: How to make a role based web application? Such as
I have some code which populates a hashtable with a question as the key
This is a really basic question but... I have some code like this var
I have a question about reflection I am trying to have some kind of
I have a question with fluent interfaces. We have some objects that are used
Following the directions at this question , I have some code running to extract
I'm not sure if I asked the question correctly. I have some code I
This is a question I have wondered about for quite some time, yet 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.