How to create a class that extends SurfaceView, starts an Activity?

So, I have a class that draws and does all the uplift in my game, which extends SurfaceView. I want to start a new activity that shows the playerโ€™s rating after his death. GameOver has a rating. How to do it?

+4
source share
1 answer
Context context = getContext(); // from MySurfaceView/Activity Intent intent = new Intent(context, GameOver.class); context.startActivity(intent); 
+6
source

Source: https://habr.com/ru/post/1337232/


All Articles