When the following code runs, an exception occurs at the setImageResource line. When I debug it, the right after that line the debugger jumps to the finally part, and then it goes into some java code in Runtimeinit.java to a method called private static class UncaughtHandler implements Thread.UncaughtExceptionHandler If I remark the finally section, then the exception is not caught by the catch part?
Why isn't the catch part working? Isn't "catch (Exception ex)" supposed to catch any type of exception?
It was just a test code. I was more interested in understanding why the try/catch did not work. The imageView was less of a concern in this excercise.
Once I was able to trap the error , it turned out to be "not enough memory" because the bitmap I was using was too big.
Your "request" is way too broad to be answered in a forum setting. Show the specific code you are having trouble with, what it is doing, what you want it to do instead, and any errors that may be relevant.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Read this Android audio playback tutorial[^] on Android developer website. They would guide you through the step-by-step processes to create playback effects. Then you can mold them into your own controls and elements to create a native feel and look for your application. However, underlying process remains the same.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~