在 OpenGL 线程上使用 Android 对话框界面?

发布于 2025-01-07 07:29:42 字数 134 浏览 2 评论 0原文

是否可以在 OpenGL 线程上使用弹出对话框?

我目前有一个游戏使用我从“Beginning android games”中学到的框架。但它不会让我实现像对话框界面这样的原生 Android 界面。我如何启动一个新线程来打开一个对话框?

Is it possible to use a pop up dialog on an OpenGL thread?

I currently have a game using the framework I learned from "Beginning android games". But it won't let me implement native android interfaces like the dialog interface. How could I start a new thread to bring up a dialog?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌化 2025-01-14 07:29:43
((Activity) context).runOnUiThread(new Runnable()
            {
                public void run()
                { 
                    //show your dialog here
                }
             }
      );
((Activity) context).runOnUiThread(new Runnable()
            {
                public void run()
                { 
                    //show your dialog here
                }
             }
      );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文