pocheshire / BottomNavigationBar

Bottom Navigation Bar for Xamarin
214 stars 70 forks source link

NavigationBar on the left side instead of at the bottom #37

Closed NPadrutt closed 7 years ago

NPadrutt commented 7 years ago

Hi

First of all: thanks for your work. :) We work on a project where we use your bottom navigation bar. This works perfectly on android 6. But on android 7 the bar sticks on the left side instead of the bottom.

Code is absolutly the same.

Activity Layout:

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/myCoordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">
    <FrameLayout
        android:id="@+id/main_frame"
        android:layout_height="match_parent"
        android:layout_width="wrap_content"
        android:layout_gravity="left|start" />
</android.support.design.widget.CoordinatorLayout>

Activity set navigation bar:

bottomBar = BottomBar.Attach(this, bundle);
                bottomBar.SetItems(Resource.Menu.menu_bottom_bar);
                bottomBar.SetOnMenuTabClickListener(this);

Layout for navigation bar:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:local="http://schemas.android.com/apk/res-auto">
  <item
    android:id="@+id/action_contacts"
    android:icon="@drawable/ic_contacts"
    android:title="Kontakte" />

  <item
    android:id="@+id/action_birthday"
    android:icon="@drawable/ic_cake"
    android:title="Geburtstag" />

  <item
    android:id="@+id/action_profile"
    android:icon="@drawable/ic_account"
    android:title="Profil" />

  <item
    android:id="@+id/action_settings"
    android:icon="@drawable/ic_settings"
    android:title="Einstellungen" />
</menu>

Do you have any idea what's the reason for this and how we can fix this?

NPadrutt commented 7 years ago

Nevermind.. I just found the _bottomBar.NoTabletGoodness(); option.. sorry ^^