Android Question Panel BringToFront still below buttons

Jason Wood

Member
Licensed User
I have some buttons in a layout, created in the designer. I've even right clicked them and selected 'send to back' in the designer. In the same layout, I have a panel that contains various labels etc - pnlInfo, also created in the designer.

In the Main activity, I create a new panel, add it to the activity then set it to 'BringToFront' since I want it to be in front of everything else

B4X:
' CREATE PANEL TO HOLD THE GAMES
     pnlGame.Initialize("pnlGame")
     pnlGame.Color = Colors.Blue
     Activity.AddView(pnlGame, 100%x, 0, 100%x, 100%y)
     pnlGame.BringToFront

It's initially off screen to the right. Later I animate the panel it in to the left. When it comes into view, it covers the pnlInfo but it does not cover the buttons. The buttons are still above the new Panel.

So my question is, why are the buttons still above the panel?
 

DonManfred

Expert
Licensed User
Longtime User
Set the panels Elevation property to 8dip
 
Upvote 0

Jason Wood

Member
Licensed User
Thanks for replying.

I set it like this but still the same problem

B4X:
pnlGame.Elevation = 8dip

Plus there is no mention of 'elevation' on the beginners guide or user guide so I don't really know what it is. I's also not mentioned in the documentation for the core library so I don't know where to read up on it.

Is there another solution? Or am I not using this 'elevation' correctly?
 
Upvote 0

Jason Wood

Member
Licensed User
Sorry, I managed to fix this issue - there was another call to pnlGame.BringToFront after the animation which I think was overriding the Elevation.

But I'd still like to find out more about what this 'elevation' is. Does anyone have a link to some info?

Cheers
 
Upvote 0
Top