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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:38:29+00:00 2026-05-31T15:38:29+00:00

So I got this background image for my activity. Its a 480×800 png. It

  • 0

So I got this background image for my activity. Its a 480×800 png.
It has a gradient in it, so there is danger of banding, that’s why I made it 99% opaque to force the best color mode.

On my device, and even on a HTC magic this is no problem.

However, on the default 1.6 emulator, I get out of memory errors. What to do?
The background is set in code with:

bgView.setImageResource(R.drawable.baby_pink_solid);

Setting the max VM heap to 192 and device ram size to 256 does not seem to be a solution.

  • 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-31T15:38:31+00:00Added an answer on May 31, 2026 at 3:38 pm

    Try accessing the Bitmap in code, and then set it via setImageBitmap(). If you get an OOM when you are decoding the Bitmap in code, then this is why you are getting it from setImageResource().

    I have found that Bitmaps are a tricky thing to handle on Android, and you have to be careful when using them!

    Also check out @Sadeshkumar Periyasamy’s answer, this is useful for decoding Bitmaps or larger sizes for devices which do not have as much power as todays devices.

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

Sidebar

Related Questions

I'm puzzled at the moment. I got this gradient background-image: -webkit-radial-gradient(50% 65%, ellipse cover,
I've got an Android app which has a periodic background Service. I want this
This is what I'm trying to do: I have a .png image as background
I got this background image slider thing working in chrome and safari, but it
I got this div tag who's background image's being set in the CSS using
I have got this css: <style type=text/css> #heading{ margin:auto; background-color: brown; } </style> and
I am new to this asp net mvc but got a strong background in
Got this line of code here but its not working. private void Button_Click(object sender,
I want to set a background image for my form/window like this guy but
I've got a stretched background image in a TD using the background-size and background-repeat

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.