Home > Back-end >  How to remove bottom margin from Activity?
How to remove bottom margin from Activity?

Time:12-19

How do I make my Activity fit the entire screen? There is this black bar at the bottom of the screen, and a menu bar on the top of the screen with the apps name. I'd like to have it be just the content inside of the activity.

Is this just a theming issue?

<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.DrinkTracker" parent="Theme.MaterialComponents.DayNight.DarkActionBar">

    </style>
</resources>

Activity with a top menu bar and bottom margin

CodePudding user response:

There is already a Guide that describes this topic: Display content edge-to-edge in your app

And if you want to remove the Toolbar just change the Theme from

Theme.MaterialComponents.DayNight.DarkActionBar

to

Theme.MaterialComponents.DayNight.NoActionBar
  • Related