开发者

disable touch focus while loading

I have an android app that uses a glSurfaceView that takes a few sections to load up.

I have onTou开发者_开发知识库chEvent overridden, and I'm trying to disable focus while it loads but setFocusable(false) isn't working.

The problem is if the user taps on the screen before everything loads, the app gets a null and it crashes.


I'd pop up a progress dialog and use an AsyncTask to do the loading of the view. Once the view is loaded you can kill the dialog. Any heavy lifting should not be done on the UI thread anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜