I used the method from Renaud here
http://stackoverflow.com/questions/7524725/android-passing-variable-from-intent-extra-to-imageview/10604079#10604079
This works fine on 2.1 2.3 phone and AVD when I tunr the phone from
landscpae to portrait and vice versa
Not in 4.03 phone and AVD, I get a java.lang.OutOfMemoryError, note that my
bitmap eg, my png file is only 189ko heavy
05-17 04:29:53.532: E/AndroidRuntime(1227): FATAL EXCEPTION: main
05-17 04:29:53.532: E/AndroidRuntime(1227): java.lang.OutOfMemoryError
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.Bitmap.nativeCreate(Native Method)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.Bitmap.createBitmap(Bitmap.java:6 05)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.Bitmap.createBitmap(Bitmap.java:551)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:524)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:499)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:374)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:404)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
com.android.fbd.Images.onCreate(Images.java:35)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.Activity.performCreate(Activity.java:4465)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3351)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread.access$700(ActivityThread.java:123)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.os.Looper.loop(Looper.java:137)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
android.app.ActivityThread.main(ActivityThread.java:4424)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
java.lang.reflect.Method.invokeNative(Native Method)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
java.lang.reflect.Method.invoke(Method.java:511)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-17 04:29:53.532: E/AndroidRuntime(1227): at
dalvik.system.NativeStart.main(Native Method)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en