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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:29:39+00:00 2026-06-05T06:29:39+00:00

So I want to use a png as the background for my android application.

  • 0

So I want to use a png as the background for my android application.

Sample Background

The condition is that the biggest snowflake:

Big Snowflake

is always at the top right corner. I can scale the image proportionately only, because otherwise, the snowflake will end up looking like a bunch of I don’t know whats:

Thorns

Given the plethora of device resolution and dpi’s available, what is a reasonable way to achieve what I want?

Update:
I am aware of 9-patch. But my background cannot be expressed in terms of a 9-patch. At best, what I can do is include the source in the largest dimensions (proportionately) possible. In my case, the source is 1920X2400 in size. To rephrase my question, what would be the safest size (with uniform scaling) to include in my app?

Here’s an example:

Non-9Patch drawable

Image copyright of original authors. Used here, only for illustration.

  • 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-05T06:29:40+00:00Added an answer on June 5, 2026 at 6:29 am

    I would do it like this:
    Use RelativeLayout to set the image at top right corner of its parent container, and resize the image proportionally according to the screen size

    example:

    <RelativeLayout xmlns:android="schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" >
         <ImageView android:id="@+id/imageView1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/expander_close_holo_dark" /> 
    </RelativeLayout>
    

    As long as you provide the image via android:src android automatically resizes it preserving the ratio.

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

Sidebar

Related Questions

I want to use my self background for my UIToolbar. To do that with
I have a large png that I would like to use as a background
I have an image that I want to use as the background for every
I want to create two new custom buttons to use in my android application.
I want to use button that background image is mine and text is on
I want to use URL such as /Image/sample.png I create route, but it does
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want use JQuery mobile for the front-end of my mobile application, but I
i want to use an image in a UIButton buttonHeader background, when i compile
i have an image that is a rounded corner rectangle, i use it for

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.