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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:49:35+00:00 2026-05-23T12:49:35+00:00

I have made the relative layout and I used fill-parent , wrap-content and for

  • 0

I have made the relative layout and I used fill-parent , wrap-content and for some margin I have to use “dp”.

But When I check on different devices the scale/density change So on surfing from Android Developer site I found that I have to defined layouts like

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

So is there any easy or smart trick for density problem without define these layouts… and work wll on all devices with only one standard layout

  • 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-23T12:49:36+00:00Added an answer on May 23, 2026 at 12:49 pm

    You don’t need those different layout folders for density problems. You need those layouts for defining different looks for different screen sizes. If you want to use different images for different densities, you need add images with different resolution to the drawable-xhdpi, drawable-hdpi, drawable-mdpi and drawable-ldpi folders.

    Android automatically selects images from right folder depending on screen density.

    1. drawable-xhdpi – density higher than 240
    2. drawable-hdpi – density 240
    3. drawable-mdpi – density 160
    4. drawable-ldpi – density 120

    Start your designing process always for medium density screens.

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

Sidebar

Related Questions

I have made following relative layout in an xml file lets say add_relative_layout.xml <?xml
I have made a cart and the cart has remove item button, but the
I have made a website using( Asp.net, c# ) and its content in English
I have different elements in my layout: Buttons, RadioButtons, EditText, a ListView and I
Hey I'm in need of some help I have made this gallery plugin where
I have made an application where i use a SimpleCursoradapter. String[] from = new
I have an Activity with relative layout on whole screen. In left top corner
I have this menu I found how to made on a tutorial but I
I have made a custom popup in an app where the layout of the
I have made one custom ListView but it is not calling any onclick listener

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.