Green_qaue
Green_qaue

Reputation: 3661

starting activity with old activity in background

Im making a game, when my mainCharacter in this game dies, or when he kills all enemies, a new intent is started, a sort of Score-screen, lets call it intent B.

My game is ofc filling the whole screen when I play, and when intent B is called this fills the whole screen aswell.

The thing is that intent B is a XML-view with a .png background, I thought this would work as .pngs work on canvas, in the way that I have a frame around the "ScoreBoard" about 100px wide, that is empty, where I want my old activity (My gameView) to be shown. In short, I want this frame to be see-through and for intent B to look like its put on top of my Game, I'm sure you've seen this in other game-apps.

some pseudo-code for how I start the new intent:

    if(Health<=0){
       setRunningOnMainThread(false);
       Intent intent = new Intent(package.package.ScoreBoard);
       intent.startActivity();
    }

Ive tried all kinds of FLAGS and some stuff in the manifest, but the frame just keeps being black. like there is nothing behind intent B.

Was hard explaining this so if you need more information let me know.

Upvotes: 1

Views: 1292

Answers (1)

Hang Guan
Hang Guan

Reputation: 102

Here's another stackedoverflow question that might be able to help, in addition to the one suggested by sandrstar.

How to make Activity, not covering full screen

Upvotes: 1

Related Questions