Hide activity

XverhelstX

Well-Known Member
Licensed User
Longtime User
Heey everyone,

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

android:theme="@android:style/Theme.Translucent"

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.

Thanks,
XverhelstX

Source: Hide Activity - Android Developers | Google Groups
 

Erel

B4X founder
Staff member
Licensed User
Longtime 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.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime 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.
 
Upvote 0
Top