[Java for Android App Development] Wampirate:
How many objects do you think is too many? I have kinda many. I mean, I create my interface with many bitmaps mainly of text, and each is 1000x400 pixels, but these bitmaps are like text on transparent surface and then I scale it, I made it so big so that it would look good on 1080p but I'm not sure now whether its correct. I'll try releasing with a loader and see

Edit: I loaded all the bitmaps with this "loader" bitmap and I don't get the memory warning. It seems that I was loading the images twice. Still, it should be able to handle ~80 images, or maybe not? :P they are like ~100kb

Edit2: I did the black screen fix and it didn't work. It crashes on null pointer exception first when I wanted to log canvas to string, then when I commented it it crashes on calling onDraw(c) because of the same reason. There is a problem with the canvas then. Why?

07-22 10:04:40.313: E/AndroidRuntime(8909): FATAL EXCEPTION: main
07-22 10:04:40.313: E/AndroidRuntime(8909): java.lang.RuntimeException: Unable to resume activity {com.mg.spaceescape/com.mg.spaceescape.GameActivity}: java.lang.NullPointerException
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2639)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2667)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1279)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.os.Handler.dispatchMessage(Handler.java:99)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.os.Looper.loop(Looper.java:137)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.ActivityThread.main(ActivityThread.java:4921)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at java.lang.reflect.Method.invokeNative(Native Method)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at java.lang.reflect.Method.invoke(Method.java:511)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at dalvik.system.NativeStart.main(Native Method)
07-22 10:04:40.313: E/AndroidRuntime(8909): Caused by: java.lang.NullPointerException
07-22 10:04:40.313: E/AndroidRuntime(8909):	at com.mg.spaceescape.GameView.onDraw(GameView.java:204)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at com.mg.spaceescape.GameActivity.onResume(GameActivity.java:44)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1199)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.Activity.performResume(Activity.java:5280)
07-22 10:04:40.313: E/AndroidRuntime(8909):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2629)
07-22 10:04:40.313: E/AndroidRuntime(8909):	... 10 more

I've done something like this:

Canvas c;
Boolean b = true;
while (b){
if(!view.getHolder().getSurface().isValid())
{
continue;
}
else {
c = null;
c = view.getHolder().lockCanvas();
synchronized(view.getHolder()){
view.onDraw(c);
}
view.getHolder().unlockCanvasAndPost(c);
b= false;
}
}

And it doesnt crashes just suspends, like the surface is never valid.

What does this part of code do?

implements SurfaceHolder.Callback

What does this callback do? My surface view class implements runnable only, no idea whether it is relevant or not but it has something to do with the surface.