Home > Software engineering >  UI bug for the light theme (Fragment)
UI bug for the light theme (Fragment)

Time:04-07

I've created a new project in Android Studio and there is a UI bug for the interface and I am not able to fix it. I don't understand what is this problem.

Basically it appears a top margin / a top padding for the fragment. In the "night theme" the problem is not present and the only thing I change between light and night is colours (in styles>themes)...

I explain a moment the structure of my project: there is the main activity, which contains "Nav_menu" and the "Fragment" view. This problem is present is all the fragments, so I thought it was a problem in Main... but I cannot understand actually.

I set manually 0dp to padding and margin, but nothing changes... do any others got this problem?

Let me show some images: enter image description here enter image description here

CodePudding user response:

I think you use theme action bar set to be true, In every fragment action bar or title bar is showing because fragment is opening through an activity, try to set false for action bar or whatever in style theme

  • Related