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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:28:55+00:00 2026-06-09T22:28:55+00:00

I am trying to understand something. A weird thing that I see is that

  • 0

I am trying to understand something. A weird thing that I see is that when I put wrap_content in the width and hight, the image is bigger than the the real px (pixel) size of the image which is inserted. Why is that so?

My code with wrap_content:

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:adjustViewBounds="false"
    android:src="@drawable/header" />

and thats my code with exact pixel size of the image:

 <ImageView
    android:id="@+id/imageView1"
    android:layout_width="378px"
    android:layout_height="155px"
    android:adjustViewBounds="false"
    android:src="@drawable/header" />

As you can see, thats the exact pixel size:

Why is that? I thought that wrap_content should wrap the view to the content size so why is it bigger on screen?

  • 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-09T22:28:56+00:00Added an answer on June 9, 2026 at 10:28 pm

    A very nice explaintaion for supporting the multiple screens is given at

    http://developer.android.com/guide/practices/screens_support.html.

    you need to put images in respective folders after scaling.

    e.g. if you want 100*100 image then place

    75*75 in drawable-ldpi for Low density devices

    100*100 in drawable-mdpi for Medium density devices

    150*150 in drawable-hdpi for High density devices

    200*200 in drawable-xhdpi for Extra High density devices

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

Sidebar

Related Questions

Trying to understand something that I don't know how to describe because I don't
I'm trying to understand the tspan tag in svg and here is something weird.
I'm trying to understand something that , by googling around, seems like a bug
I'm trying to understand exceptions for my C++ class, and there is something that
I am trying to understand something about getTime() , My problem is that, I
Trying to understand something. I created a d:\svn\repository on my server. I committed folders
I'm trying to understand on a deeper level if I'm missing something as to
I am trying to understand the difference between this: if (isset($_POST['Submit'])) { //do something
I'm trying to understand REST. Under REST a GET must not trigger something transactional
I'm trying to learn MVVM, but there is something I don't understand yet. Currently,

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.