Android Question Height of navigation bar

Discussion in 'Android Questions' started by welu1805, Jan 26, 2015.

  1. welu1805

    welu1805 Active Member Licensed User

    Hi all,

    my tablet has no hardware buttons for "Menu", "Back" and so on. They are as software buttons at the bottom on the screen in the navigation bar.

    How can I get the height of this navigation bar?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Most devices don't have hardware buttons. 100%y doesn't include this bar so its size is not really important.
     
  3. welu1805

    welu1805 Active Member Licensed User

    I have an ImageView on a ScrollView.Panel, the ScrollView.Panel.Height is set to bitmap.height.

    The height of the bitmap of the ImageView is larger than the screenheight therefor I want to scroll.

    When I scroll to the bottom I can't see the last part of the bitmap. It's behind the navigation bar.
    Therefor I want to set ScrollView.Panel.Height = bitmap.Height + NavigationBar.Height.

    real-display.Height - 100%y is NavigationBar-Height

    Can I get the real display.Height?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    How are you adding the ScrollView? Add it with the designer and set the vertical anchors to BOTH (and resize it to fill the screen).
     
  5. welu1805

    welu1805 Active Member Licensed User

    Thanks. I set the vertical anchors to BOTH and ScrollBar.Height to 100%y. Now it works fine!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice