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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:34:33+00:00 2026-06-05T23:34:33+00:00

I have a layout which looks like this: <LinearLayout> <ImageView> android:width=wrap_content android:height:wrap_content … </ImageView>

  • 0

I have a layout which looks like this:

 <LinearLayout>
     <ImageView>
     android:width="wrap_content"
     android:height:"wrap_content"
      ...
     </ImageView>

     <ImageView>
     android:width="wrap_content"
     android:height:"wrap_content"
      ...
     </ImageView>

     <ImageView>
     android:width="wrap_content"
     android:height:"wrap_content"
      ...
     </ImageView>

     <ImageView>
     android:width="wrap_content"
     android:height:"wrap_content"
      ...
     </ImageView>
 </LinearLayout>

The sizes of the images are such that they fill the screen on a 540×960, 275ppi screen. But when I run my app on an emulator, the last image is squished.

After reading the Supporting Multiple Screens document, I learned that specifying the image dimensions in dp’s instead of “wrap_content” should cover for different density screens.

But what about screens with different sizes? For example, if I have two different-sized screens with the same pixel densities, I can have a condition where my image fits the screen on one of them but not on the other, right? Is having two different layouts the only solution?

For example, the two different-sized (but same density) screens might have 100 and 200 vertical pixels available, and image is sized 150dps, so it wouldn’t fit on the first screen. Am I right?

Thanks in advance

  • 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-05T23:34:34+00:00Added an answer on June 5, 2026 at 11:34 pm

    Almost any Android app which tries to fill the entire window with set bitmaps without being willing to crop, scale or leave uncovered areas is doomed to failure. With so many different aspect ratios and screen sizes it’s just not possible to magically fit a set of content with a fixed aspect ratio and size. Even if you provide another layout that handles a different size screen that won’t really fix the problem because no doubt there is a third device out there somewhere with a screen size that is different from both of the two that you’ve covered.

    Consider using a set of images that include a portion which can be stretched or cropped without losing fidelity. That might be just a solid color, a gradient, a repeating pattern or possibly something else. Alternatively if appropriate you can just allow scrolling. All of this is dependent on your content and what you’re trying to achieve though.

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

Sidebar

Related Questions

Ok so I have a layout which looks something like this: LinearLayout TextView LinearLayout
this is the layout i have: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=match_parent android:orientation=horizontal android:minHeight=?android:attr/listPreferredItemHeight> <LinearLayout android:orientation=vertical
I have created a custom tab layout which look like this,I want to make
I have asp repeater which looks like this <asp:Repeater runat=server ID=Repeater1> <HeaderTemplate> <table border=1>
I have a layout that looks kind of like this: And the code looks
I have a defined idl file, which looks like this: module Banking { typedef
I have a faux dialog which uses this layout: <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a checkbox in my ListView row which looks like this. =========================================== [CheckBox]
I have a layout I want to reuse, it looks like: <LinearLayout .. >
I have a quite complicated HTML/CSS layout which I would like to convert to

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.