Android Question Panel elevation (again?)

nibbo

Active Member
Licensed User
Longtime User
Hi all

I am having problems with hidden panels not showing when made visible in the code.

In the designer I have created a panel which has the visible checkbox unticked.
The panel elevation is set to 2 (have tried lots of different numbers) but when it is made visible in the code it does not show over the top of the activity.

The layout is set in the designer script to fill the entire screen using
B4X:
pnlName.SetLeftAndRight(0,100%x)
pnlName.SetTopAndBottom(0,100%y)

The only way I can get it to work is to put all of the activity controls on a another panel and hide that before I show the desired panel.

Any ideas?

Thanks
 

klaus

Expert
Licensed User
Longtime User
Can you post your project as a zip file or a small example showing the problem?

By the way, instead of this code in the DesignerScript
pnlName.SetLeftAndRight(0,100%x)
pnlName.SetTopAndBottom(0,100%y)

you can remove the two lines and set the two anchors to both
upload_2018-7-31_10-25-38.png
.
 
Upvote 0

nibbo

Active Member
Licensed User
Longtime User
Can you post your project as a zip file or a small example showing the problem?
you can remove the two lines and set the two anchors to both View attachment 70507.

Hi Klaus

Weird, I did a quick demo and the panel shows fine even though I forgot to set the elevation in the designer!
I set the elevation to 0 in my project and the panel is now showing Ok which has just served to confuse me even more...

It may be that I have rebooted my device since or disconnected it form the designer but no matter what I do I cannot get it to go wrong.
All good now but no idea what caused it to behave differently in the first place.

I was aware of the anchors but that makes it difficult in the designer to do the layout with all of the controls from the main activity showing through so I tend to drag panels away from the activity until I am happy with the layout then anchor them when I have finished.

Thanks for your time.
 
Upvote 0
Top