eswaat
eswaat

Reputation: 763

pause android activity and it should be visible(unclickable) on screen

I have activity with pause button in it. Now what I want is when user press a pause button whole activity should be pause and also it should be visible.

I know through pause it is possible but I don't want my activity to be send to background.

So I have following things in my activity around 10 button in table layout, TextBoxs in table layout and timer.

So here is one example of what I want where the screen is pause. Is there any way to do this and still it should be visible OR unclickable.

enter image description here

Upvotes: 0

Views: 461

Answers (1)

Shobhit Puri
Shobhit Puri

Reputation: 26017

On thing you can do is to start a transparent activity on pause, which is on Top of the existing activity. That activity would only have a TextView containing "Game Paused" text. Since another transparent activity is on top, the user won't be able to click anything on activity below.

Upvotes: 2

Related Questions