Android :: OOM After Image View Make Phone Unresponsive

Sep 16, 2010

My app, among other things, downloads and displays images from the Internet. Some might be too large and trigge an OOM when ImageView.setImage() is called. Of course, this normally makes the application to crash. I've put catch (OutOfMemoryError e) around the method invocation. I know that catching errors is unusual, but in JSE applications it proved to work pretty good, especially when the problem was due to image manipulation that consumed all the memory. The Android app seemed to survive for a while, but then it blocked the computer. All buttons are irresponsive, even though the phone seems still alive (e.g. it's playing the audio notification that new email has been spotted). I tried holding the power button, it triggered the shut down menu, but touching a menu option didn't do anything. Only after a while, the phone became responsive again.

Now, it's reasonable that one can't display everything on a smartphone; I'm sure there's some inefficient memory management I'm doing (perhaps keeping too many images in memory); ok, I have to improve my code. Given that I'll do, how can I add some safety facility to avoid the most severe consequences? Making an irresponsive application it's a 100% sure way to make people to uninstall my app and give bad reviews. I'm thinking of a two-pronged safety approach: 1) whether it's possible to understand in advance whether an image is too large to be rendered by itself;
2) whether it's possible to recover from an OOM in any case.

Android :: OOM after Image View Make phone Unresponsive


HTC EVO 4G :: Little Delays Occasionally When Tried To Make A Phone Call - Keyboard Unresponsive When Tried To Text

Nov 6, 2010

I'm rooted but s is still on and nand is not unlocked. I'm running the stock rom.

I use to get little delays occasionally when I tried to make a phone call, and sometimes the keyboard was unresponsive when I tried to text. Always passed in a few minutes.

Now the thing is just lagging. delays all the time regardless of what I'm doing. I also get a message sometimes when I try to take pics saying I don't have file permissions for the sd card. A shutdown will usually resolve this.

Sometimes when I shutdown I can't restart it without popping the battery out for a few seconds.

I thought it might be related to an overclock widget I was trying so I deleted it without improvement.

View 4 Replies View Related

Android :: Make List View For Items - Add Image

Aug 31, 2010

I need to make a list view as shown in the sample pic for my android app. How to do it? Also I need to add image along it as seen in the sample pic. and link it to another view to show some more details.please check links shown below.

View 2 Replies View Related

Android :: Reverse Image Load Order - Loading Animation In A Image View While The Real Image Is Loaded?

Jul 21, 2010

I use http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012 to load images in a ListView and a GridView. It works but the images are loaded form bpttom to top. How to fix that?

Bonus Question: Can I use a loading animation in a image view while the real image is loaded? Right now it's just a default image.

View 1 Replies View Related

Android :: How Do I Make My Image View Fixed Size Regardless Of Size Of Bitmap

Sep 23, 2010

So I'm loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in a ListView in android. I'd like to fix the size of my ImageView so that it only shows a portion of the image if it's larger than a preset amount. I've tried everything I can think of setting the setMaxWidth/setMaxHeight, setting the scale type to centerCrop, using ClipableDrawable wrapping my BitmapDrawable, setting using Drawable.setBounds(). I've tried setting in the XML and programmatically, but neither worked. I'm very surprised setting max width/height didn't do anything. Below is the XML I'm using ImageView definition in my layout file

View 1 Replies View Related

Nexus :: Live Wallpapers Make Screen Unresponsive

Jan 15, 2010

The grass blades live wallpaper, I've never had issues with.When I set wallpaper to this one, my screen becomes unresponsive.Was wondering if anyone has narrowed down how the nexus screen becomes unresponsive at times. Like I said, I have no issues with the static wallpaper or even using the grass live wallpaper, but using the wallpaper above makes the entire screen unresponsive at times and I 'think' it's sort of buggy.

View 7 Replies View Related

Android :: View Multiple Image With System Image Viewer

Sep 7, 2010

We can view an image with What if we have some images? How can we put the extras to let the viewer know we have /sdcard/a.jpg, /sdcard/b.jpg, /sdcard/c.jpg ? I hope to do this in a time because starting an activity is very expensive. Code...

View 2 Replies View Related

Android :: Change Source Image For Image View When Pressed

Nov 16, 2010

I have a scroll view with lots of image buttons. I want to change the image for an image button when it's pressed. The thing is that I want the image to remain until another image button is pressed. That's why I couldn't use a selector. What is the best practice to achieve his?

View 3 Replies View Related

HTC Hero : How To Make Complete Backup Image Of Phone?

Sep 4, 2009

I plan on buying an HTC Hero when they release it next month for Sprint. Is there a way that I can make a complete backup image of the phone in it's original state before I inevitably screw something up on it?

View 13 Replies View Related

Android :: Yahoo Fantasy Football App - Make It Possible To View Stattracker On G1 Phone

Oct 29, 2008

Somebody please make it possible to view Stattracker on my g1 phone. I would love you forever.

View 11 Replies View Related

Android : How Can I Layout 1 Image View On Top 1 Image On Bottom

Feb 10, 2010

I have a vertical LinearLayout. I would like to layout 1 ImageView on top and 1 ImageView at the bottom of that LinearLayout. I tried putting 'android:gravity="top"' and 'android:gravity="bottom"' in each of the ImageView, but both ImageView appears at the top of the LinearLayout. Is there a way to fix it?

CODE:................

View 2 Replies View Related

Android :: View Image In Action View Intent?

Nov 16, 2009

I'd like to show a png or jpg I downloaded from the next in an image viewer intent, but can't get it to work.

Bitmap bmp = getImageBitmap(jpg);
String path = getFilesDir().getAbsolutePath() + "/test.png";
File file = new File(path);
FileOutputStream fos = new FileOutputStream(file);
bmp.compress( CompressFormat.PNG, 100, fos );
fos.close();
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(path)), "image/png");
startActivity(intent);

I know the bitmap is downloaded ok (use the same routine for supplying it my ImageView instances elsewhere in my app) - I think it wrote to file ok, I can see it on disk and the file size is correct. The intent is launched but an exception is thrown: then the new activity just sits there, blank. How does this work?

View 1 Replies View Related

Android :: Add View To XML Layout Programmatically / Make It Z Order Below Existing View

Oct 8, 2010

I have an XML layout with some custom tabs, a heading, and a ProgressBar(main.xml). I wish to add another XML layout(home.xml) to the main.xml layout, as i wish to keep main.xml re-usable for other activity's layouts and simply add things to it as necessary.The problem: after inflating R.layout.home into rootLayout, it seems as though the ProgressBar contained in rootLayout is hidden underneath the content of home.xml.Is there a way to tell certain views(via XML) to float above other views when the layout is constructed in this way?if not, am i forced to use methods such as progressBar.bringToFront() to raise targeted views to the top?what alternatives do i have in z-ordering views when some layouts are constructed using inflation?

View 2 Replies View Related

Android :: How To Add Decorator Image On Top Of Image View?

Jul 25, 2010

I have an ImageView in my android layout. And I would like to add a 'decorator' image at the lower right corner of my image view. Can you tell me how can I do it? I am thinking of doing with a FramLayout with 2 image views as its child, but how can i make one image the lower right corner of another?

View 2 Replies View Related

General :: Image View Overlap List View

Mar 3, 2012

Is it possible to have an image view overlap a listview? Basically I want to put a vertical line done the center of my list view to make a vertical dividier between the textviews in a listview row that are statically sized horizontally and dynamically sized vertically.

View 5 Replies View Related

Android :: MapOverlay Turns Phone Unresponsive

Jun 11, 2010

I'm trying to draw some points (around 200) in a MapOverlay and noticed that the application gets slow and the phone becomes unresponsive. After adding the Log.i message I found the problem, the loop is run endlessly (note that the phone is quiet and there's nothing happening in the background): Is this a "normal" behaviour, a bug in the OS or am I doing something wrong?Here's my code...

View 7 Replies View Related

HTC EVO 4G :: Swipe To Unlock Phone Sometimes Unresponsive

Jul 10, 2010

So its only when the phone is ringing. The swipe to get it out of the locked mode can be so unresponsive that I miss the phone call. Is there a calibration for the screen?

View 1 Replies View Related

HTC Desire HD :: Phone's Become Slow And Unresponsive

Oct 26, 2010

Since about 10pm last night my dhd has become unbelievably slow. every key press (whether it's accessing a menu or typing a word) has a delay and even loading my inbox takes several seconds. the circular sync logo is displaying itself most of the time on the top right of the screen, so it could be something to do with that? i've tried rebooting the phone, going offline etc. but nothing seems to be able to fix it.anyone else had this problem with a desire or desire hd before? it worries me a little. i hate stuff like this...

View 7 Replies View Related

Android :: Image View That Is Fixed Size Regardless Of Image Size

Nov 16, 2010

I have an ImageView which I want to always be the same size. If the image is smaller than the view, I'd like it to be centred in the view. If the Image is larger than the view then I'd like it scaled down - with aspect ratio preserved.I've had several attempts at this myself

View 2 Replies View Related

HTC EVO 4G :: Randomly Phone Will Start Freaking Out Either Becoming Unresponsive

Jul 20, 2010

I've been getting intermittent (and I'd even say random) lag spikes on my phone, either through basic navigation of the phone's features or just turning the screen on from time to time. For instance:

- I'll turn my screen on, and go to unlock it, and get zero response from the screen. It won't fix itself unless I turn the screen off again, and then back on, which will fix the problem 90% of the time. I think once I had to remove the battery.

- Randomly the phone will start freaking out, either becoming unresponsive to what I'm doing, or eventually going black and reverting back to the lock screen.

- Sometimes navigating through apps is a breeze, but other times, it's an absolute nightmare. Slow responsiveness to touch input, and even extremely slow response from my home keys. They'll vibrate to let me know they're receiving the input, but nothing will happen (tapping home button with no response from the phone.)

There has been other issues, but all mainly stemming from slow/poor response to user input. Is my phone a lemon, or is this normal? Is anyone else experiencing less than stellar performance from their EVO, or is the phone performing like a top-of-the-line, iPhone competitor should?

I came from an iPhone, and don't get me wrong, it had it's share of slow reaction at times, too. But we're talking a 2+ year old iPhone 3G, not a brand new iPhone 4. When I first got my 3G, the thing was fast as lightning. My EVO? Not so much.

View 7 Replies View Related

HTC Incredible :: Phone Unresponsive When Out Of Hand (Car, Table, Etc.) / Fix It?

May 4, 2010

Edit: Here's the original thread by igl007, w/ video:

http://androidforums.com/support-troubleshooting-incredible/70366-unresponsive-screen-when-car-dock.html[/QUOTE]

View 5 Replies View Related

Android :: How To Make A Button From An Image PNG?

Mar 9, 2009

I'd like to know how to make a button out of a PNG and display it on my canvas (using drawBitmap?). When I click on this button, it will take me to a new activity. All this will be in the onClickListener. So, how do I take a PNG, make a button with it, and draw it on my canvas? I looked at ImageButton, but I'm unsure how it works or how to draw it on the canvas.

View 5 Replies View Related

Android :: How To Make An Image In Perspective?

Aug 7, 2010

As the title says I wonder how I can make my images to perspective view. Here's an image showing how they manage to do this in photo shop: http://netlumination.com/blog/creating-perspective-and-a-mirror-image-in-photoshop. Is it possible to do something like this in android?

View 1 Replies View Related

Android :: Need To Make An Image Click Able?

Aug 9, 2010

I'm kind of new to this whole thing so I need some help. I have an application that creates an Image View On Create. I want to make this image click able and have it open a browser to a specific link. How would I do this? I'm having trouble specifically with the setOnClickListener because the parameters are not accepting an OnClickListener. I'm developing for Android 1.6

View 2 Replies View Related

Android :: How Can I Make Image Scrollable?

Apr 10, 2009

I have an image that takes up a lot more space than the android screen. I want the image to be presented full size and the user can move in any direction. Like a map.

View 2 Replies View Related

Android :: Way To Make Clickable Map Image?

Oct 18, 2010

I need to display a pretty image of a map of Europe, and I want my app to, e.g. bring up a different activity, when the user clicks each country - each country on the map needs to have a different onClickListener (or equivalent). Essentially, I need to be able to call a different function when the user taps on France rather than Spain in an image such as this:http://commons.wikimedia.org/wiki/File:Blank_map_of_Europe_cropped.svg How would I best go about this on Android?

View 1 Replies View Related

Android :: How To Add Image On Surface View?

Aug 29, 2009

I am trying to add an image on surface view. I have coded...

View 5 Replies View Related

Android :: Mix Tab With Image View And TextView

Jul 11, 2009

How can I best mix in one activity a tab activity with an ImageView / TextView?

View 2 Replies View Related

Android :: Draw A View On Top Of Image?

Aug 9, 2010

How do I draw a view on top of image. There is a predefined android xml file and when I run the application I would like to bring up a dot or a square on the top of image. Here the image already shows up from pulling information from andrid res folder , how to draw an dot over it.

View 2 Replies View Related

HTC Incredible :: Phone Call Abruptly Disconnects / Touch Screen Becomes Unresponsive

Aug 18, 2010

I've had this issue happen a few times, so I disregarded it, but a few hours ago it happened 3 times in a row.I'm in the middle of a phone call, and suddenly I hear a beep, and I look at the phone and the call was disconnected (I'm back on the 'Phone' screen). I then realize that the phone becomes unresponsive (the screen doesn't respond, same thing goes for the Home/Menu/Back/Search buttons).The only thing I can do is press the top 'Off/Lock' button to shut off the screen, then press it again, and everything goes back to normal.Is anyone else experiencing this problem? If so, any advice/solutions?My phone is stock, no rooting or roms. I've downloaded a few apps from Android market and that's about it.My 30-day purchase window is up in about a week, so I'd like to get this resolved before then to avoid any headaches.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved