我在AndEngine中的ChangeableText有一些問題。我想知道如何在不凍結屏幕的情況下更新文本?現在我使用這種方式,但它凍結了我的手機大概2-3秒:Android AndEngine - 如何更新ChangeableText值
private void removeFace(final Sprite face) {
hm = getIconNames();
if(face.getUserData().equals("petrol")){
elapsedText.setText(hm.get(25));
final PhysicsConnector facePhysicsConnector = this.mPhysicsWorld.getPhysicsConnectorManager().findPhysicsConnectorByShape(face);
this.mPhysicsWorld.unregisterPhysicsConnector(facePhysicsConnector);
this.mPhysicsWorld.destroyBody(facePhysicsConnector.getBody());
this.mScene.unregisterTouchArea(face);
this.mScene.detachChild(face);
} else {
}
System.gc();
}
任何想法如何做到這一點?