Suppose the game is drawn on the canvas, if I lose, I want to display a window with the result and the button to continue, what are the options? Print a separate fragment? Is it possible? Or is it a new activation that is designed so that it looks like a window? It seems there is still a dialog box, but is it possible to impose it to any kind and display it over the canvas?
public class MainGamePanel extends SurfaceView implements SurfaceHolder.Callback { //тут создается поток в котором реализован игровой цикл, при некотором положении в игровом цикле хочу вызвать диалог, но так как наследуюсь не от Activity сделать это не получается.. как быть? } So I call the dialogue
new GameOverFragment().show(getFragmentManager(),"login"); The problem is exactly the same as here https://stackoverflow.com/questions/10268422/show-dialog-in-game-with-canvas but I did not understand how they solved it ..