Reputation: 4024
I have two activities in my application.one of the activity started by service class ,so i have set the flag FLAG_ACTIVITY_NEW_TASK and start the activity.
in that activity i hide the status bar by using the following code .
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN)
The problem is some time the activity not hiding the statusbar.After doing several testing i found that the FLAG_ACTIVITY_NEW_TASK is creating problem.
how to solve this?
Upvotes: 0
Views: 207
Reputation: 200120
What if you do that directly in the XML:
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
Upvotes: 2