BottomNavigationBar icon indicating copy to clipboard operation
BottomNavigationBar copied to clipboard

hiding the visibility of bottom bar creates empty space

Open glalwani2 opened this issue 9 years ago • 6 comments

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.

glalwani2 avatar Aug 09 '16 14:08 glalwani2

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

SebastianBone avatar Nov 29 '16 18:11 SebastianBone

Same issue Here ! Calling BottomBar.Hide(bool) set an empty space at the top, and the actionbar is broken

javiholcman avatar Nov 30 '16 22:11 javiholcman

Have the same issue here. Any workarounds or fixes?

shrop21 avatar Dec 08 '16 23:12 shrop21

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;

SebastianBone avatar Jan 18 '17 15:01 SebastianBone

Somehow this bug has returned from the undead.

15mgm15 avatar Apr 13 '18 23:04 15mgm15

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.

15mgm15 avatar Apr 15 '18 01:04 15mgm15