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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:59:09+00:00 2026-06-15T13:59:09+00:00

My app is loading a large image (a house floorplan), then drawing touch-reactive objects

  • 0

My app is loading a large image (a house floorplan), then drawing touch-reactive objects (furniture, lamps etc.) on the image. I have a base image file included with my app but the objects come from coords in my database.

I’ve successfully deployed the app in multiple iterations, but now I need to use larger base images and BitmapFactory is causing an OutOfMemory exception on many devices (both old and new devices; anything with < 32MB heap seems to crash). I’ve read the 157 OOM questions on SO, but I’m afraid the link they all seem to point to won’t help me since resolution / zooming is critical to the app’s function.

I’ve tried to test the device’s available memory before loading, but the results are spotty at best (some devices like the galaxy S3 report plenty of heap but still crash). I’ve also tried decreasing resolution but the image became unusable when reduced to a safe size based on the above test.

Is there another way to implement this design without ever using bitmaps?
I need to:

  • Load large base image
  • Create clickable shapes on top of the base image, maintaining their position / scale relative to the base image
  • BONUS: in the iOS version of my app, I can do SVG-style text scaling so a long label on a small object will stay inside the object
    instead of running across the map(and will be invisible until the
    image is zoomed). Replicating this in android would make me a happy
    code monkey.

I can post code if needed, but you’ve all seen it before (almost all of it came from SO).

Thanks in advance for reading, and for any help you can give.

  • 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-15T13:59:10+00:00Added an answer on June 15, 2026 at 1:59 pm

    you have a few options:

    1. break your large image into tiles, load these tiles into an array, and move a camera object around and only load tiles that need to be drawn, as the comments suggest.

    2. make your image small and scale it up using ‘android:scaletype`

    3. Draw lines and curves on a Canvas object at runtime.

    4. Use OpenGL

    The appropriate solution really depends on how you want it to look. Tiling will take more dev effort but will look better, just be careful that you are properly cleaning up any tiles that aren’t being drawn…

    dynamically scaling will be easier, but you cannot guarantee the image won’t be blurry.

    Drawing on a Canvas object at runtime could work well– just use Lines of different width and circles and Rects etc.

    Using OpenGL will have the steepest learning curve, and might be overkill. This depends on your purpose.

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

Sidebar

Related Questions

I'm loading a large number of PVR texures in cocos2d in an iOS app,
I have a html wrapper app loading all js, css and images from ipad
I have an android app which gives the user the option of loading a
Possible Duplicate: Error loading Active Record gem with sinatra app using RVM I have
I have an app that uses ASI-HTTP-Request for large files, and I had a
I have an app which caches large images so that user do not wait
I have a large array with around 20k objects in it. Each object has
My windows phone app is freezing while loading the main page. I have set
A complex web-app can have a large amount of user and/or context specific meta
I have an app that's pretty much a large presentation of a companies product.

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.