Created
December 21, 2014 10:34
-
-
Save takashi1975/4df672f5a774aa9ffeaf to your computer and use it in GitHub Desktop.
Android ... Activity以外のクラスからUIスレッドを実行 (Cocos2d-x前提)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Activityを取得 | |
Activity actitivy = (Activity)org.cocos2dx.cpp.AppActivity.getContext(); | |
{ | |
//UIスレッドで処理 | |
actitivy.runOnUiThread(new Runnable() { | |
@Override | |
public void run(){ | |
Log.d("xxx class" , "test"); | |
//ここで処理 | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment