I have run in to an irritating bug that moves all my layouts by the spacing of the titlebar, without the titlebar being there. It has this space when running in an emulator "Profile: Nexus 5x", but looks normal on my Oneplus 3.

I have tried removing it by treating it as a titlebar, but i'm suspecting it might be somethings else. 

Like som kind of universal padding throught all my layouts. I'm so stumped on this.

It can also be seen in the "Design" window when editing xml.

EDIT EDIT EDIT ========================================= EDIT EDIT EDIT

I found out that using the roughhike bottomBar library and trying to display more than 3 icons, propmpted the extra space on the top of the screen for some reason. After using the native design library "BottomNavigationView" i have had no problem.

EDIT EDIT EDIT ========================================= EDIT EDIT EDIT

Any idea what could be spacing as a tiltebar, but not be the titlebar?

[![enter image description here](https://i.stack.imgur.com/hyBfO.png)](https://i.stack.imgur.com/hyBfO.png)

**Android manifest.xml**: 

```
<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false">
        <activity
            android:name=".MainActivity"
            android:theme="@style/AppTheme.NoActionBar">

```

**Style.xml:** 

```
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
            <item name="windowActionBar">false</item>
            <item name="windowNoTitle">true</item>

        </style>

        <style name="AppTheme.NoActionBar">
            <item name="android:windowActionBar">false</item>
            <item name="android:windowNoTitle">true</item>

        </style>

```

**Activity\_main.xml:** 

```
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

        <com.roughike.bottombar.BottomBar
            android:id="@+id/bottomBar"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:layout_alignParentBottom="true" />

</FrameLayout>

```

**content\_main**: 

```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.razze.roomee.MainActivity"
tools:showIn="@layout/app_bar_main">

</RelativeLayout>

```

**MainActivity.java**: 

```
package com.example.razze.roomee;

public class MainActivity extends AppCompatActivity {

    private static Context mContext;
    private static Point windowsSize;
    private FragmentManager fragmentManager;
    BottomBar bottomBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE); //before
        setContentView(R.layout.activity_main);

        // HomeActivity uses these
        mContext = getApplicationContext();
        windowsSize = Utility.getDisplaySize(getWindowManager());

        // Declares bottomBar and it's items
        bottomBar = (BottomBar) findViewById(R.id.bottomBar);
        bottomBar = BottomBar.attach(this, savedInstanceState);
        bottomBar.setItems(R.menu.bottombar_menu);
        bottomBar.setDefaultTabPosition(2);

        // BottomBar OnClickListener
        bottomBar.setOnMenuTabClickListener(new OnMenuTabClickListener() {

            @Override
            public void onMenuTabSelected(@IdRes int menuItemId) {

                fragmentManager = getFragmentManager();

                System.out.println("Menu selected: " + menuItemId);

                switch (menuItemId){

                    case R.id.preferences:

                        fragmentManager.beginTransaction()
                                 .replace(R.id.content_main,
                                            new PreferencesActivity())
                                 .commit();
                        break;

                    case R.id.matches:

                            fragmentManager.beginTransaction()
                                    .replace(R.id.content_main,
                                            new MatchesActivity())
                                    .commit();
                        break;

                    case R.id.settings:

                        fragmentManager.beginTransaction()
                                 .replace(R.id.content_main,
                                            new SettingsActivity())
                                 .commit();
                        break;

                    case R.id.home:

                            fragmentManager.beginTransaction()
                                    .replace(R.id.content_main,
                                            new HomeActivity())
                                    .commit();
                        break;

                    case R.id.message:

                           fragmentManager.beginTransaction()
                                   .replace(R.id.content_main,
                                           new MessageActivity())
                                   .commit();
                        break;
                }

            }

            // When an icon in BottomBar that is selected, gets selected.
            @Override
            public void onMenuTabReSelected(@IdRes int menuItemId) {     }

        });

      // Colors the bottombar (DOESNT WORK FOR SOME REASON
      //bottomBar.mapColorForTab(0, "#FF9800");
      //bottomBar.mapColorForTab(1, "#FF5252");
      //bottomBar.mapColorForTab(2, "#7B1FA2");
      //bottomBar.mapColorForTab(3, "#FFF352");
      //bottomBar.mapColorForTab(4, "#455FA2");

    }

    // HomeActivity uses these
    public static Context getMainContext(){ return mContext; }

    public static Point getWindowSize(){ return windowsSize; }

}

```

Thanks in advance for any help, would be much much appreciated.