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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:12:01+00:00 2026-06-03T03:12:01+00:00

its simple my doubt. The app have 4 directories(ldpi, mdpi, hdpi, xhdpi) with same

  • 0

its simple my doubt.
The app have 4 directories(ldpi, mdpi, hdpi, xhdpi) with same images but different dpi . For mdpi is 160dpi, the one im using atm.

What happens with the images i download from the web? i have a news reader and that means each new have one image at least. And i want to have a decent image for all the smartphones.

Do i need different type of images or just download the same for all?
Can i know which resolution is best for each particular smartphone?

I couldn’t find the “official” way to handle this so i dont know if its important dpi for images that we plan to download.

Regards!

  • 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-03T03:12:02+00:00Added an answer on June 3, 2026 at 3:12 am

    ldpi means ~120dpi,mdpi means ~160dpi, hdpi means ~240dpi. xhdpi means ~320dpi.
    you can follow 3:4:6:8 ratio for ldpi:mdpi:hdpi:xhdpi for resources.

    Now you can have different images for all the resolution it is better and there must be no problem. If you cant have different images for all then have a image for xhdpi and runtime you can resize the image depending on the screen resolution.

    YOu can use below sample code to know the screen resolution at runtime::

    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);
    switch (metrics.densityDpi) {
    case 120:
        //your stuff
    break;
    case 160:
        ////your stuff
        break;
    case 240:
        ///your suff
        break;
    case 320:
        //your stuff
        break;
    }
    

    sample code to resize the bitmap::

    Bitmap mIcon_val = your bitmap;
    Matrix matrix = new Matrix();   
    matrix.postScale((float)newwidth/mIcon_val.getWidth(), (float)newheight/mIcon_val.getHeight()); 
    Bitmap resizedBitmap = Bitmap.createBitmap(mIcon_val, 0, 0, mIcon_val.getWidth(),  mIcon_val.getHeight(), matrix, true);
    

    now you have the new bitmap new width and height you can use it.

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

Sidebar

Related Questions

it's kind a simple question but i have the doubt see the code belows
Well, I have a simple question, at least I hope its simple. I was
Its a simple config app with 4 checkboxes and 5 textboxes, and all values
Its a simple question, but I'm not aware of the answer and I couldn't
May be its a simple question but it's really driving me crazy. I just
I'm developing a desktop Mac OS X App that saves its very simple data
I have a class CollectionOfThings . As its name suggests its a simple collection
I like ExpressionEngine, but I'm starting to doubt its power. For example, I'm looking
I have a simple doubt. I have made a custom ActionScript mxml component, which
This is no doubt a newbish question, but I have looked for an answer

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.