iOS Question [SOLVED] Possible to make B4XDrawer cover top of screen also?

Discussion in 'iOS Questions' started by Sandman, Nov 6, 2018.

  1. Sandman

    Sandman Well-Known Member Licensed User

    This question is regarding the lovely B4XDrawer, which I'm a huge fan of.

    On Android, B4XDrawer also covers the top of the screen, like we can see here:
    (With a transparent status bar)


    On iOS the drawer doesn't overlap the top section:


    However, when looking at (for instance) the Gmail app for iOS, their menu also covers the top section:


    I have no idea if it's possible and reasonable to make B4XDrawer also cover the top area on iOS, but I thought it might be worth asking.

    (I looked at the B4XDrawer source to see if it was a simple adjustment needed, but I could see that all references to Top for that panel was already set to 0, so I'm thinking probably some magic stuff is needed for this - and that's very far from my skill set.)
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can do two things:

    1. Hide the navigation bar:
    NavControl.NavigationBarVisible = False
    You can create your own bar instead.

    2. You can hide the status bar:

    I don't think that it is possible to draw over the status bar.
    Sandman likes this.
  3. Sandman

    Sandman Well-Known Member Licensed User

    That's an excellent, and very doable, compromise - thanks!

    Just looking at Gmail in my iPhone, it seems possible to do it. However, I imagine it's entirely possible they did what you suggested with the nav bar, and just hid it and made their own that looks identical.
  4. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Hello Sandman,

    Did you find a solution to overdraw the statusbar?

    If you did with other solution, please, comment here.

    But the solution I found is simple:

    In the Resize event on B4XDrawer, just change:
    mBasePanel.SetLayoutAnimated(0,  00, Width, Height)
    mBasePanel.SetLayoutAnimated(0,  0, -20, Width, Height+20)
  5. Sandman

    Sandman Well-Known Member Licensed User

    No, I did not. I didn't really try very hard, but I will take a look at your solution when I revisit this code. But you are saying it works perfectly, and that you actually can overlap the statusbar that easily?
  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