Best set up image preload

I have a game application and I have many screens. The first screen will be the SCREEN.LOADING screen.

When the application starts, I want to show the picture "loading, please wait" when the images, menus, etc. loaded successfully.

I tried using asynctask, but this does not work in GLThread. What is the way to do this in opengl-es?

03-06 12:46:35.282: ERROR/AndroidRuntime(32736): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

Thanks Leslie

+3
source share
1 answer

Are you sure you created your own AsyncTaskin the user interface thread?

queueEvent , , .

, Handler ( ) GL GL Handler. .

+1

Source: https://habr.com/ru/post/1796627/


All Articles