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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:36:48+00:00 2026-06-08T17:36:48+00:00

How do i set images for all screen resolution by coding in custom view?

  • 0

How do i set images for all screen resolution by coding in custom view? not by creating xml

  • 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-08T17:36:48+00:00Added an answer on June 8, 2026 at 5:36 pm

    If you make a LinearLayout with fill_parent parameters and fit the image in there, you could accomplish this. Check this question for code examples.

    As far as “all screen resolutions” goes, Android mostly takes care of that. If you want an image to fill a portion of the width of your screen (perhaps what you mean by “strip”?), then use fill_parent width and wrap_content height attributes. Or, if you want the image to fill only half the width of that “strip”, get the device’s width in pixels and divide by 2, i.e.
    getWindowManager().getDefaultDisplay().getWidth(); / 2, and set the ImageView‘s dimensions that way. This will accommodate any Android device since you’re setting different values for the image depending on the device, not hard-coding an arbitrary value for the dimensions, e.g. 100px.

    Does this cover what you’re trying to ask? Your question isn’t too specific.

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

Sidebar

Related Questions

How can I set all images in one line and display only the first
How do I set conditions to affect all images within my webpage (via CSS)
I have a set of images in a folder call 'uploads/', all the files
Is there anyway to keep images in the gallery set at all times? Instead
I'm trying to create an app that has a set of images on screen.
I want to set the Expires header for all image/* and text/css . I'm
How to get the perticluar image from large set images in one image using
I have a set of images that when moused over need to change to
I have a set of images that have to be desaturated on load and
I display set of images(small). I need to show the larger image(300*300) at some

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.