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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:04:51+00:00 2026-06-12T04:04:51+00:00

To support different resolutions, we need to make variations of layout files as described

  • 0

To support different resolutions, we need to make variations of layout files as described in Supporting Multiple Screens very well. Assuming you don’t plan to show different arrangement of your UI but just want to stretch appropriately, your variations would be mostly about different weights. At least that is the case with my app so far.

Now, how do you manage changing the application with this structure? Since it repeats the layout many times, one layout change in your application causes multiple files change.

I thought of two options:

  1. Changing the values dynamically in your code
    • Downside is your layout related work is spilled over to the code. I really don’t like this.
  2. Making child layout to extract common layout elements
    • Downside is your layout’s hierarchy will be deeper and cluttered so it would be harder to figure out what’s going on. Still, this is better than option #1 thanks to Hierarchy Viewer. I am not sure if this approach will be always achievable.

If you could share your tricks to get through this, it would be much appreciated.

  • 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-12T04:04:53+00:00Added an answer on June 12, 2026 at 4:04 am

    I think I found a solution. I will accept it as an answer if others give thumbs up.

    I found Configuration qualifiers described in Supporting Multiple Screens works not only for res/drawable and res/layout but also for res/values. So on my layout/some_layout.xml, I say like this:

    <ImageButton
        android:id="@+id/imagePlay"
        android:layout_width="@dimen/button_size"
        android:layout_height="@dimen/button_size"
        android:scaleType="fitCenter"
        android:src="@drawable/play" />
    

    Then on values/layout.xml file you define the default button_size:

    <resources>
        <dimen name="button_size">44dp</dimen>
    </resources>
    

    And on values-xlarge/layout.xml file you define the xlarge mode button_size:

    <resources>
        <dimen name="button_size">66dp</dimen>
    </resources>
    

    I didn’t try other values resources, but I assume it also works for Styles and Themes so in case your layout customization is a little bit more than a size or weight, you could define a style in the values and use it.

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

Sidebar

Related Questions

I read the official document about supporting multiple screens http://developer.android.com/guide/practices/screens_support.html According to that document,
I have read all the pages I could find about support multiple screens in
I'm implementing a web application which will support different views according to different browsers.
I've created my app using all the neccessary things to support different screen sizes/densities
I am trying to have my client side validation (model binding) to support different
I wonder if there is any support for different versions of class in JAXB.
I'm going to add support of different timezone in my ASP.NET MVC3 app. The
http://www.sqlite.org/threadsafe.html From above link I came to know, SQLite support three different threading modes
Is there a way to mark issues with different options than the default Bug\Feature\Support
We're maintaining a web product that we've sold to several different customers. We support

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.