Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying Transparent theme to Activity : Doesn't fit full screen in Device

I am working in an android application and I have made an activity transparent by applying style in the manifest file.But after applying this my layout screen appears to be cut in the left and right and seems to show only in the center.

In the emulator its appears to be fine but in ma android device(ICS) it show only in the middle. Please help me. Thanks in advance.

My Theme style is :

<?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>
like image 854
Arun Avatar asked Feb 21 '23 01:02

Arun


1 Answers

Try this theme:

<activity
        android:name=".SharescreenActivity"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
        android:screenOrientation="landscape" >
    </activity>
like image 181
Nermeen Avatar answered Mar 23 '23 00:03

Nermeen