Naila Naila - 3 months ago 32
Android Question

Get full screen layout in Fragment

I have a main Activity, and I am loading Fragments inside it.

I do not want the ActionBar, so I have hidden it in Manifest as follows


When I populate a Fragment, the ActionBar is hidden, but it gives a black portion on the bottom of the screen and I can't even use that specific portion in my layout.

Any help?


Replace your style.xml with below code:


    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    <style name="AppTheme.NoActionBar"> 
        <item name="windowActionBar">false</item> 
        <item name="windowNoTitle">true</item> 


and then set theme as