Skip to content

Bottom Bar overlays part of the layout #59

Closed
NickM-27 opened this Issue · 4 comments

2 participants

@NickM-27

After the latest update, the bottom bar is taking up part of the bottom layout (see how the FAB is overlapped), I guess because it isn't pushing it up?

screenshot_20160320-233349

@roughike
Owner

What does your XML / Java look like?

@roughike
Owner

And are you using the version 1.1.5? I think this bug was introduced a couple versions before that, but I just might've fixed it again in 1.1.5.

@NickM-27

This was on 1.1.5

here is the code:

@Override
    protected void onCreate(Bundle savedInstanceState) {
        activateTheme(getSharedPreferences("Settings", 0).getInt("theme", 0));
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

appBar = BottomBar.attach(this, savedInstanceState);
        appBar.noNavBarGoodness();


        if (findViewById(R.id.main_container) != null) {

            MainAppFragment mainAppFragment = new MainAppFragment();
            mainAppFragment.setArguments(getIntent().getExtras());

            HelpFragment helpFragment = new HelpFragment();
            helpFragment.setArguments(getIntent().getExtras());

            SubscriptionFragment subscriptionFragment = new SubscriptionFragment();
            subscriptionFragment.setArguments(getIntent().getExtras());

            AboutFragment aboutFragment = new AboutFragment();
            aboutFragment.setArguments(getIntent().getExtras());

            appBar.setFragmentItems(getSupportFragmentManager(), R.id.main_container,
                    new BottomBarFragment(mainAppFragment, R.drawable.ic_home, "Home"),
                    new BottomBarFragment(helpFragment, R.drawable.ic_help, "Help"),
                    new BottomBarFragment(subscriptionFragment, R.drawable.ic_card_giftcard, "Subscription"),
                    new BottomBarFragment(aboutFragment, R.drawable.ic_info, "About"));


//Here is the layout

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".ui.MainActivity">

</LinearLayout>
@NickM-27

Update: Updated to 1.1.7 and all is good now

@roughike roughike closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.