读书人

AndEngine学习随记-横屏时没法再次绘制

发布时间: 2012-08-30 09:55:54 作者: rapoo

AndEngine学习随记----横屏时无法再次绘制界面
我不得不说下,最近刚研究AndEngine,相关文档太少,学得太郁闷,好在有例子程序,于是就自己尝试着写点demo,于是,问题出现了,当编写完第一个demo时,能够正常显示界面了,可是我本能的旋转下屏幕后,问题出来了,黑屏了,我左测右测,终于发现了问题所在。
看完这段代码注释就懂了
/**
Inform the view that the activity is paused. The owner of this view must call this method when the activity is paused. Calling this method will pause the rendering thread. Must not be called before a renderer has been set.
*/
方法: void org.anddev.andengine.opengl.view.GLSurfaceView.onPause()
所以每当activity暂停时都要调用该方法。

读书人网 >移动开发

热点推荐