B4A Library [B4X] [XUI] AS Draggable Bottom Card

lucasheer

Active Member
Licensed User
Longtime User
Hello!

Not sure if it is alright to post on this thread, but love this library!

However- In B4A, any panels in the first LoadLayout are shown over the DraggableBottomCard. Even though the Draggable bottom card was initialized and created after LoadLayout?

I tried:
B4X:
asdbc_main.BodyPanel.BringToFront
asdbc_main.Headerpanel.BringToFront
asdbc_main.DarkPanel.BringToFront
asdbc_main.BodyPanel.Parent.BringToFront

Thank you!


Edit- Figured it out, it was because of panel elevation on my form controls. Here was my fix:
B4X:
Dim pp As Panel = asdbc_main.BodyPanel.Parent
pp.Elevation = 1dip
 
Last edited:

b4x-de

Active Member
Licensed User
Longtime User
I use the DraggableBottomCard in the immersive mode of an Acticvity that fills the entire screen. On devices with a notch, the problem arises that when the card is fully opened (ExpandFull), the notch overlaps the header panel. Therefore I would like to be able to adjust the height of the header panel to react to a notch. I can determine the height of the notch myself. But I can't then adjust the height of the header panel. Would it please be possible to implement a setHeaderHeight(Height As Float) in addition to the getHeaderHeight()? Thanks a lot!
 

b4x-de

Active Member
Licensed User
Longtime User
Thank you, but it is not the FirstHeight or SecondHeight I'm asking for but the HeaderHeight.
 

b4x-de

Active Member
Licensed User
Longtime User
The notch height of a device only affects the HeaderHeigt when the card is fully opened in Immersive Mode. Therefore, I want to adjust the HeaderHeight when the card is fully opened and the device has a notch. In all other cases the HeaderHeight will not be adjusted.


Currently, I can only have the same HeaderHeight for both sizes. There is no way to change it.
 

Attachments

  • IMG_20230517_124846.png
    495.5 KB · Views: 97
  • Screenshot_20230517_124759.jpg
    60.4 KB · Views: 88

Alexander Stolte

Expert
Licensed User
Longtime User
Changing the height of the header is not provided. I have already spent 20 minutes implementing it, but I would have to make deep changes. So it will not be implemented for now.

I looked at your images, I recommend you to change the height of the body, everything else would look strange. Just take the height of the activity, subtract the height of the notch, then you have the perfect height.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Or just check during initialization if there is a notch and adjust the height of the header...
The notch does not spawn where the menu is expanded, but is there all the time...
 

b4x-de

Active Member
Licensed User
Longtime User
Far from beeing perfect, but it seems to work in B4A:

B4X:
Public Sub setHeaderHeight(pfltHeight As Float)
    Dim fltHeightDiff As Float
  
    fltHeightDiff = pfltHeight - g_header_height
  
    If fltHeightDiff = 0 Then
        Return
    End If
    g_header_height = pfltHeight
    If expand_state = 1 Then
        xpnl_card_header.SetLayoutAnimated(0,0,0,g_width,g_header_height)
        xpnl_card_body.SetLayoutAnimated(0,0,g_header_height,g_width,g_first_height + g_header_height)
    Else
        xpnl_card_header.SetLayoutAnimated(0,0,0,g_width,g_header_height)
        xpnl_card_body.SetLayoutAnimated(0,0,g_header_height,g_width,g_second_height)
    End If
    xpnl_card_header.Height = g_header_height * 2
    VisibleBodyHeightChanged
End Sub
 
Last edited:

Kope

Active Member
Licensed User
am currently having same issue since am not using b4xpages

please help us out
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…