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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:20:12+00:00 2026-06-12T07:20:12+00:00

In Android, we can specify resources depending on the screen size by appending qualifiers

  • 0

In Android, we can specify resources depending on the screen size by appending qualifiers to the folder names, such as “res/values-xlarge”. I am working on a large enterprise application that has some fairly big styles.xml and dimens.xml files. Obviously, I do not want to duplicate the entire files for each screen size that needs some small tweaks.

What is the best way to specify tweaks to styles, dimens, and similar resources without duplicating the common parts?

  • 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-12T07:20:13+00:00Added an answer on June 12, 2026 at 7:20 am

    Just specify the values you want to modify in the different folders, and leave the common ones on the lowest level. Styles will be a bit harder to do, but you can actually make a common style with all common values, then specify the differences in a different style that inherits from the first one.

    For example, you can have a style A in res/values/ that has the common behaviour for all the different styles. However, in large screens (hdpi and xhdpi) you want to have a common behaviour you don’t want in little screens: Just create a B style that inherits from A and has that behaviour in res/values, then specify the differences in res/values-xhdpi and res/values-hdpi.

    If Android cannot find a value in R in a “proper” folder, it will search elsewhere until it finds said value.

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

Sidebar

Related Questions

I was wondering how I can specify the size of cache in Android emulator?
Android applications can specify intent-priority. How does android handle security situation such as following.
In the AVD manager for Android in Eclipse I can specify the size of
Can Android be woken up from sleep by a peripheral device such as an
In Android, you can specify the Linux user under which your app should run.
I am making a widget in which you can specify the text size controles.setTextViewTextSize(R.id.LblMsg,
I'm trying to retrieve Android style values at runtime, so I can apply them
How can I specify shared libraries to load in the Android.mk when compiling with
How can you specify a column span in an android's gridview? I have a
In android, I can specify text appearance like this: <TextView android:id=@+id/text android:textAppearance=?android:attr/textAppearanceSmall/> Can you

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.