Reputation: 2145
I'm an android beginner. I did not want my app to have an action bar, so I disabled it.
However, other views are displayed after a blank padding, which is where the action bar previously was. Like
How can I have this space removed? I have tried:
Upvotes: 3
Views: 2154
Reputation: 930
Add this code in style.xml
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:actionBarSize">0dp</item>
</style>
and use this code in Activity theme in manifest.
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar">
</activity>
Upvotes: 5