BottomNavigationBar
BottomNavigationBar copied to clipboard
hiding the visibility of bottom bar creates empty space
Hi @pocheshire ,
I am about to finish my development of app and there is one(major) problem which I am facing. The problem goes like this.
In my activity I have set WindowSoftInputMode = SoftInput.AdjustPan and I am using this as my application theme
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
The thing is I want to hide the bottombar when the keybaord pops -up, so for that I have added a globalListener to my rootlayout and I detect that when keyboard is up I hide thebottombar. I have attached the bottombar to the framelayout of my main.axml.Uptill now I had the above thing set but recently i had noticed that I am not able to scroll the entire view when the softkeyboard is up coz i have set adjustPan so I set it to adjustSize in my activity, Now what is happening is I am getting an empty space above my framelayout which is inside DrawerLayout, when ever I am hiding the bottomBar on keybaord pop-up. I am unable to resolve this issue can you kindly help me with that.
My main.axml looks like this
<RelativeLayout>
<LinearLayout>
<AppBarLayout>
// has toolbar
//has searchlayout
</AppBarLayout>
<DrawerLayout>
<FrameLayout>
//BottomBar attached to this framelayout
</FrameLayout>
<NavigationView>
//HamburgerMenuitems
</NavigationView>
</DrawerLayout>
</LinearLayout>
</RelativeLayout>
So my problem is I am not able to figure out why and from where that empty space equal to height of bottombar is coming(presumably) and how do I fix that.
Thanks again for such a great library.
I have the same issue when I like to show a fragment in my activity without the bottombar. Calling "BottomBar.Hide(bool)" and the fragment UI slides down and I get an empty space on top.
Greetings Sebastian
Same issue Here ! Calling BottomBar.Hide(bool) set an empty space at the top, and the actionbar is broken
Have the same issue here. Any workarounds or fixes?
Hello friends,
i found a little workaround which helps with this issue. I hope it works for you guys.
This is doing the hiding magic without the upper gap:
BottomBar.ItemContainer.Visibility = ViewStates.Gone;
and for showing:
BottomBar.ItemContainer.Visibility = ViewStates.Visible;
Somehow this bug has returned from the undead.
Looks like Xamarin.Forms 2.5.444934 is the one that has the issue, I rolled back to a previous version and everything is working correctly.