Hide activity

Discussion in 'Android Questions' started by XverhelstX, Apr 8, 2011.

  1. XverhelstX

    XverhelstX Well-Known Member Licensed User

    Heey everyone,

    I did some research, and it seem to be possible to hide your activity like this:

    but how do i exactly add this to my xml file and what if I have 2 activities and I only want to hide the second one?

    Hope u can help me.


    Source: Hide Activity - Android Developers | Google Groups
  2. Erel

    Erel Administrator Staff Member Licensed User

    Each activity has an <activity> node. You should add the theme as an attribute to this node.

    <activity android:theme="@android:style/Theme.Translucent" android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main" android:label="Smiley" android:screenOrientation="unspecified"> <intent-filter>...

    Make sure to set AndroidManifest.xml to be read only. Otherwise it will be overwritten when you compile.
  3. XverhelstX

    XverhelstX Well-Known Member Licensed User

    Ok, sorry for late answer.

  4. stevel05

    stevel05 Expert Licensed User

    I've been playing with this a bit today, I wanted a full screen translucent activity so that the background could be visible behind parts of the activity that didn't have my panels on it.

    Unfortunately this only works correctly for Android 2.3 and up. For 2.2 and below the activity is translucent and full screen, but the notification bar is overlaid on top. Searching Google I found no solution, just frustrated programmers.