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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:45:01+00:00 2026-06-10T14:45:01+00:00

I didn’t really understand the DP measure, even though I’ve read about it 2

  • 0

I didn’t really understand the DP measure, even though I’ve read about it 2 times.

Let’s say I have an image it’s resolution is: 400 X 400 PX.

And I want to put it as background image to my app.
and I’m putting the same image on the different drawable folders(ldpi,mdpi,…)

Would the image strech? I don’t know what resolution the image should be on the different drawable folders so it will fit the devices.

  • 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-10T14:45:03+00:00Added an answer on June 10, 2026 at 2:45 pm

    Your base density is mdpi. So your 400×400 dp image will be rendered as is on mdpi devices only. If you want the same size on ldpi, you have to scale your image by 0.75. For hdpi your image needs to be 1.5 times bigger and for xhdpi devices, 2.0 times the size of your mdpi.

    As mdpi is your base, I always put drawables in res/drawable-mdpi folder while developing. Once I got code ready for release I add hdpi resources to res/drawables-hdpi. I personally do not care ldpi devices as mostly no device I target is lower density than mdpi and if anyone will have such, then I am fine with android framework doing the downscale. But the upscaling is other story – you will always get bad results (blurry images) as you simply cannot technically make bigger bitmap from smaller without artifacts (no, CSI lies 😉 – you simply got not enough data so you have to extrapolate. So it’s better to provide proper drawables yourself or your end users would complain and your app may look not as nice as it could.

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

Sidebar

Related Questions

I didn't fully understand the concept of threads I have some questions. Assume we
Didn't know how else to put this. Say I have a JavaScript method that
Didn't see a question similar to this, so here goes: Let's say I'm running
I didn't really know how to phrase this question, its quite strange. I have
I didn't find information about performance issues with auto_ptr and shared_ptr (I use tr1
I didn't take any official course of Javascript. I often read this in tutorials:
It didn't have a project and I removed myself as the assignee, now I
I didn't face this error before. I have a database db , that contains
I didn't find anything about parsing HTML in the XML::LibXML::Reader documentation. And I tried
I didn’t know about the <button> tag until today.

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.