Applying a transparent theme to an action: not suitable for full-screen mode on a device

I work in an Android application and I made the action transparent by applying a style in the manifest file. But after applying this screen, my layout seems to be cut left and right and seems to show only in the center.

In the emulator, this looks fine, but in ma android device (ICS) it only appears in the middle. Please help me. Thanks in advance.

My theme style:

<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.Transparent" parent="android:Theme"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsFloating">true</item> <item name="android:backgroundDimEnabled">false</item> </style> </resources> 

Manifest file:

  <activity android:name=".SharescreenActivity" android:theme="@style/Theme.Transparent" android:screenOrientation="landscape" > </activity> 
+4
source share
3 answers

Try this thread:

 <activity android:name=".SharescreenActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:screenOrientation="landscape" > </activity> 
+8
source

  android:launchMode="singleTop" android:name=".main" android:label="main" android:screenOrientation="unspecified" android:theme="@android:style/Theme.Translucent.NoTitleBar"> 

0
source

Try this style, tested on 2.3.3+ devices, works great

  <style name="Theme.XXXXXXX.Transparent" parent="Theme.XXXXXXX"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowIsTranslucent">true</item> <item name="android:background">#00000000</item> </style> 
0
source

All Articles