1

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.

Green_qaue
  • 3,561
  • 11
  • 47
  • 89
  • Games like fruit ninja, are custom built UI's all entirely in Opengl and canvas. They manage a state, and depending on the state is how the screen is rendered, with what menus, and how the input is processed. In Fruit Ninja for example, you are really playing the game the entire time, from the menus to the modes to the stats and scoreboards. – WIllJBD Sep 11 '12 at 01:41
  • the question looks just like this one http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android , doesn't it? – sandrstar Sep 11 '12 at 01:47
  • will that question not make the whole activity transparent? – Green_qaue Sep 11 '12 at 01:58

1 Answers1

1

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

Community
  • 1
  • 1
Hang Guan
  • 102
  • 5