To make the Full-Screen Activity, So far I have tried it as below :
requestWindowFeature(Window.FEATURE_NO_TITLE)
before setContentView() method in Activity.
Also Tried adding below lines :
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN)
But it not worked. Then, I have moved to manifest and Tried as below :
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"
<activity
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"
android:name="SplashActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and the stype I have tried above is as below :
<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
And Yes, In my layout the Root tag is as below :
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="@drawable/bg_layout_screen">
means using android:fitsSystemWindows="true"
Now, the issue is It's not visible as full-screen activity. The issue screenshot is as below :
[![enter image description here][1]][1][![enter image description here][2]][2]
But Still, the issue is as below Image.
First Image : [1]: https://i.stack.imgur.com/fbJ2l.jpg
Second Image : [2]: https://i.stack.imgur.com/ZTpgw.jpg
Black is while adding this line in manifest :
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"
Please guide. What might be the issue? Thanks.