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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:49:48+00:00 2026-05-22T11:49:48+00:00

My application has a toolbar with ImageButtons that I use as application buttons. I

  • 0

My application has a toolbar with ImageButtons that I use as application buttons. I specify the layout_width and layout_height of the buttons as 12mm. (12mm * 160dpi) / (25.4 mm/in ) = 75.9pix, on a 160dpi device. Similarly, it will be 113.4pix on a 240dpi device. So, I would be inclined to make my mdpi drawables about 60×60 and my hdpi drawables about 90×90 (to allow for some margins and such).

However, I run into an issue on devices like my Samsung Galaxy Tab. Which, unfortunately, is classified as hdpi despite being only 170dpi. At 170dpi, 12 mm = 80.3pix. But, because it is hdpi, it will use the 90×90 icon, which is far too big.

My inclination is forgo the ldpi/mdpi/hdpi framework, and just package icons at 30×30, 40×40, 50×50… 100×100. And, in code, choose which one to use based on the stated dpi on the device (which is also inaccurate, but far less so). However, this seems hard to maintain and just generally inefficient.

Any advice on how to handle this situation?

  • 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-22T11:49:49+00:00Added an answer on May 22, 2026 at 11:49 am

    Don’t use the absolute size units like mm and in. With the way current devices are, they can’t be relied on. Only use px and dp.

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

Sidebar

Related Questions

My application has to detect that the device connected to the Wi-Fi network is
My application has a plug-in model that allows third-party developers to write assemblies that
I believe the application has some parts that target .NET, and some that don't.
My web application has a login page that submits authentication credentials via an AJAX
I am working on a Haskell application using gtk2hs. This application has a toolbar
I'm developing a php application that has to be able to browse the server,
My application has a complex schema for the domain entity. It is required use
Application has an auxiliary thread. This thread is not meant to run all the
My application has a need to let the user choose a date from a
Our application has a file format similar to the OpenDocument file format (see http://en.wikipedia.org/wiki/OpenDocument

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.