File tree Expand file tree Collapse file tree
samples-android/ButtonClicker/jni Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -561,7 +561,15 @@ void Engine::LeaveGame() {
561561 */
562562void Engine::InitUI () {
563563 // Show toast with app label
564+
565+ // The window initialization
566+ jui_helper::JUIWindow::Init (app_->activity , JUIHELPER_CLASS_NAME);
567+
564568 ndk_helper::JNIHelper::GetInstance ()->RunOnUiThread ([]() {
569+ if (NULL == jui_helper::JUIWindow::GetInstance ()->GetContext ()) {
570+ LOGE (" ====JUIWindow::Context is NULL, not showing Toast" );
571+ return ;
572+ }
565573 jui_helper::JUIToast toast (
566574 ndk_helper::JNIHelper::GetInstance ()->GetAppLabel ());
567575 toast.Show ();
@@ -573,7 +581,7 @@ void Engine::InitUI() {
573581 //
574582
575583 // The window initialization
576- jui_helper::JUIWindow::Init (app_->activity , JUIHELPER_CLASS_NAME);
584+ // jui_helper::JUIWindow::Init(app_->activity, JUIHELPER_CLASS_NAME);
577585
578586 //
579587 // Buttons
You can’t perform that action at this time.
0 commit comments