Android - Game Thread and Dialogs
问题 I have a Android game w/ a ViewThread and a Panel that uses the onTouchEvent. What's the best way to call the parent Activity's 'showDialog' method when the Panel's onTouchEvent is fired and to communicate the resulting information back to the underlying code? For example in my Panel I have the following: @Override public boolean onTouchEvent(MotionEvent event) { int todo = map.click(event.getX(), event.getY()); //If a valid square was clicked, lets popup a dialog if(todo == 1){ //Activity